GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HASH::DIFF (3)

.ds Aq ’

NAME

Hash::Diff - Return difference between two hashes as a hash

CONTENTS

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>

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HASH::DIFF (3) 2015-08-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.