I'm having a little problem using FreezeThaw to compare two hashes. The hashes are fairly complex (hash of lists of hashes). According to perlfaq4, I ought to be able to do this in a test file:
use FreezeThaw qw(cmpStrHard); use JScan::ReadCrossLinks; use Test::More; BEGIN { plan tests => 1, todo => [1] }; # Initialize %crosslinkscorrect with what we expect. ################################################## # Test 1. Read our test file and compare to the control. ReadCrossLinks(\%crosslinks, \%options); # This should fail if the hashes are different, right? ok(cmpStrHard(\%crosslinks, \%crosslinkscorrect));
So the problem is that this test always succeeds, even when I feed it mangled data. What gives? Alternatively, is there another, simpler way to compare the contents of two hashes that contain complex data like this?
--J
In reply to Using FreezeThaw correctly? by Rhys
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |