-
-
07 Aug 2018 09:08:02 UTC
- Distribution: Hash-Diff
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (2)
- Testers (976 / 0 / 0)
- Kwalitee
Bus factor: 0- 96.83% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (9.86KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Hash::Diff - Return difference between two hashes as a hash
SYNOPSIS
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} }
DESCRIPTION
Hash::Diff returns the difference between two hashes as a hash.
- diff ( <hashref>, <hashref> )
-
Diffs two hashes. Returns a reference to the new hash.
- left_diff ( <hashref>, <hashref> )
-
Returns the values in the left hash that is not, or different from the right hash.
CAVEATS
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.
BUGS
Sure! Report here: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Hash::Diff
AUTHOR
Bjorn-Olav Strand <bo@startsiden.no>
CONTRIBUTOR
Charles McGarvey <ccm@cpan.org>
COPYRIGHT
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.
Module Install Instructions
To install Hash::Diff, copy and paste the appropriate command in to your terminal.
cpanm Hash::Diff
perl -MCPAN -e shell install Hash::Diff
For more information on module installation, please visit the detailed CPAN module installation guide.