Package DE_EPAGES::Core::API::HashDiff
This module provides a base class to compare hash structures. To use this module, you must create a sub class and implement the methods insert(), delete() and update().
Functions
compare
Compares the hash structures $hOld and $hNew. Calls insert() for each key that exists in $hNew, but not in $hOld. Calls delete() for each key that exists in $hOld, but not in $hNew. Calls update() for each key that exists in both $hNew and $hOld.
Syntax |
$Diff->compare( $hOld, $hNew ) |
Input |
|
delete
Called by compare for each key that exists in $hOld, but not in $hNew.
Syntax |
$Diff->delete( $Key, $OldValue ) |
Input |
|
insert
Called by compare for each key that exists in $hNew, but not in $hOld.
Syntax |
$Diff->insert( $Key, $NewValue ) |
Input |
|
new
Compares the hash structures $hOld and $hNew. Calls insert() for each key that exists in $hNew, but not in $hOld. Calls delete() for each key that exists in $hOld, but not in $hNew. Calls update() for each key that exists in both $hNew and $hOld.
Syntax |
my $Diff = DE_EPAGES::Core::API::HashDiff->new( %options ) |
Input |
|
Return |
|