3 # test for rt.cpan.org 20768
5 # There was a bug where the internal "does not exist" object could get
6 # confused with an overloaded object.
9 if( $ENV{PERL_CORE} ) {
11 @INC = ('../lib', 'lib');
14 unshift @INC, 't/lib';
19 use Test::More tests => 2;
25 'eq' => \&overload_equiv,
26 '==' => \&overload_equiv;
29 return bless {}, shift;
33 if (ref($_[0]) ne 'Foo' || ref($_[1]) ne 'Foo') {
34 print ref($_[0]), " ", ref($_[1]), "\n";
35 die "Invalid object passed to overload_equiv\n";
38 return 1; # change to 0 ... makes little difference
42 my $obj1 = Foo->new();
43 my $obj2 = Foo->new();
45 eval { is_deeply([$obj1, $obj2], [$obj1, $obj2]); };