Struct::Compare3pm
Recursive diff for perl structures.
Usage
use Struct::Compare;my $is_different = compare($ref1, $ref2);
Overview
Compares two values of any type and structure and returns true if they are the same. It does a deep comparison of the structures, so a hash of a hash of a whatever will be compared correctly.
This is especially useful for writing unit tests for your modules!
Public functions
- •
-
$bool= compare($var1,$var2)Recursively compares
$var1to$var2, returning false if either structure is different than the other at any point. If both are undefined, it returns true as well, because that is considered equal.
Bugs/needed enhancements
- •
-
blessed references
compare currently does not deal with blessed references. I need to look into how to deal with this.
Releases
9 releases since Debian 5.0 (Lenny); the text changed 4 times.