| Module | Conclusion |
|---|---|
| Data::Dumper | Hashes not consistently serialised |
| Test::More | Only does a shallow comparison. |
| Tie::IxHash | Solves a different problem. Anonymous hashes cannot be tied |
| FreezeThaw | Only copes with shallow structures |
| Struct::Compare | Does not handle references |
| Recursive comparison by thraxil | Does not handle object references |
| Data::Compare | Does not handle references |
Conclusion: either fix Data::Dumper or roll my own compare routine :-<.
Update 2: I have been looking further at Test::More. There are numerous versions floating about, owing to the way in which people have used it to package up their tests in their own modules.
The definitive Test::More on CPAN has a function eq_hash, which suffers from the same syndrome as Data::Dumper when it comes to ordering of keys.
Update 3: simonm++ The module Class::MakeMethods::Utility::Ref does the business! Shame about the name - something as useful should not IMO have a module name 4 levels down, with no clue as to what it can do.
In reply to Re: Need a test for deep equality
by rinceWind
in thread Need a test for deep equality
by rinceWind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |