Subject: | repeated object bug |
I think this is a bug in 1.18 (the latest on CPAN right now).
Attached is a patch for t/deep-objects.t. With this additional test,
t/deep-objects.t will fail. It seems to me this ought to pass. I don't
see how $l and $m could be considered different.
I do not have a fix, though I suspect it's related to %been_there and
this line:
$rval = 0; # is this the right thing to do?
If it's agreed that this is indeed a bug, I'd be happy to try to provide
a fix.
Thanks,
-Todd
Subject: | Data-Compare-1.18.patch |
diff -ru Data-Compare-1.18/t/deep-objects.t Data-Compare-1.18.diff/t/deep-objects.t
--- Data-Compare-1.18/t/deep-objects.t 2008-01-15 16:41:05.000000000 -0600
+++ Data-Compare-1.18.diff/t/deep-objects.t 2008-03-20 11:50:35.292835000 -0500
@@ -10,7 +10,7 @@
print "1..0 # Skipping no Clone found\n";
exit(0);
} :
- eval 'use Test::More tests => 1;';
+ eval 'use Test::More tests => 2;';
use Data::Compare;
@@ -26,3 +26,8 @@
Compare($j, $k);
ok(Compare($j, $k), 'Can compare deeply-nested objecty jibber-jabber');
+
+my $l = bless { j => $j, j_also => $j }, "Foo::K";
+my $m = bless { j => $j, j_also => $j }, "Foo::K";
+ok(Compare($l, $m), 'Can compare duplicated deeply-nested objecty jibber-jabber');
+