2 # $Id: /mirror/googlecode/test-more/t/is_deeply_dne_bug.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
4 # test for rt.cpan.org 20768
6 # There was a bug where the internal "does not exist" object could get
7 # confused with an overloaded object.
10 if( $ENV{PERL_CORE} ) {
12 @INC = ('../lib', 'lib');
15 unshift @INC, 't/lib';
23 if( !eval "require overload" ) {
24 plan skip_all => "needs overload.pm";
35 'eq' => \&overload_equiv,
36 '==' => \&overload_equiv;
39 return bless {}, shift;
43 if (ref($_[0]) ne 'Foo' || ref($_[1]) ne 'Foo') {
44 print ref($_[0]), " ", ref($_[1]), "\n";
45 die "Invalid object passed to overload_equiv\n";
48 return 1; # change to 0 ... makes little difference
52 my $obj1 = Foo->new();
53 my $obj2 = Foo->new();
55 eval { is_deeply([$obj1, $obj2], [$obj1, $obj2]); };