[Israel.pm] Test::More - is_deeply - repeating graphs

Shmuel Fomberg semuelf at 012.net.il
Thu Jul 24 11:41:33 PDT 2008

Hi All.

I'm using Test::More structures that point to the same scalar from 
multiple points. for example:

my $x1 = [7..9];
my $x2 = [7..9];

my $ref1 = [1,2,3,$x1, [4,5,6,$x1, $x1]];
my $ref2 = [1,2,3,$x1, [4,5,6,$x2, $x1]];

At work: (Perl 5.6)
is_deeply( $ref1, $ref2, "\$ref1, \$ref2"); # failed
is_deeply( $ref2, $ref1, "\$ref2, \$ref1"); #passed

(this is from memory - I need to verify it tomorrow)

however, at home (Perl 5.8) I can't reproduce it.
Can anyone tell me if something changed between the versions?
It's actually pretty nice, (the old version) because I can test that the 
structure is shaped in particular way.


More information about the Perl mailing list