| Hash::Diff(3pm) | User Contributed Perl Documentation | Hash::Diff(3pm) |
Hash::Diff - Return difference between two hashes as a hash
use Hash::Diff qw( diff );
my %a = (
'foo' => 1,
'bar' => { a => 1, b => 1 },
);
my %b = (
'foo' => 2,
'bar' => { a => 1 },
);
my %c = %{ diff( \%a, \%b ) };
# %c = %{ foo => 1, bar => { b => 1} }
Hash::Diff returns the difference between two hashes as a hash.
This will not handle self-referencing/recursion within hashes well. This will only handle HASH and SCALAR.
Plans for a future version include incorporate deep recursion protection. And support for ARRAY.
Sure! Report here: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Hash::Diff
Bjorn-Olav Strand <bo@startsiden.no>
Charles McGarvey <ccm@cpan.org>
Copyright (c) 2010 ABC Startsiden AS. All rights reserved.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
| 2022-12-12 | perl v5.36.0 |