On Tue, Sep 09, 2003 at 01:25:22PM +0100, Adrian Howard wrote: > >1) ok $str1 eq $str2; > >2) is $str1, $str2; > >3) is_deeply [$str1], [$str2]; > >4) is_deeply $str1, $str2; > All should pass as far as I am concerned.
OK - what if it was slightly more complex: package MyString; use overload '""' => sub { shift->{value1} }, fallback => 1; sub new { my ($class, $val1, val2) = @_; bless { value1 => $val2, value2 => $val2 }, $class; } (and MyString2 as an identical subclass again)... This time we have: my $str1 = MyString->new("foo", "bar"); my $str2 = MyOtherString->new("foo", "baz"); ??? Tony ~