On 7/3/05, Fergal Daly <[EMAIL PROTECTED]> wrote: > I (and I think Yves) had always been thinking in terms of 2 structures > that had been produced independently, that is nothing in $a can be > part of $b but that's not realistic. In real test scripts, chunks of > the expected and the received values will be shared. The solution > there is that whenever a ref appears on both sides it can only match > up with itself. So I'd even say that > > is_deeply( [$x, $y], [$y, $x]); > > should fail.
Assuming $x=[] and $y=[] then i would disagree. Id also disagree that if a ref is on both sides it has to pair up with itself. The two sides need to be inspected independently That does not mean that they need to be independent. For instance imagine something like this: $x=[]; $y=[]; my $h1={ a=> $x,b=>$x,c=>$x,d=>$y }; my $h2={ a=> $y,b=>$y,c=>$y,d=>$x }; Id consider that a pass. the values in the a,b,c and shared, the values in the d slot are not. It doesnt matter that they appear reversed between the two. IOW, i would consider them equivelent if is(Dump($h1)->Out,Dump($h2)->Out) passed. Which in this case it would. -- perl -Mre=debug -e "/just|another|perl|hacker/"