Provided by: libparanoid-perl_2.05-2_all
NAME
Paranoid::Data - Misc. Data Manipulation Functions
VERSION
$Id: lib/Paranoid/Data.pm, 2.05 2017/02/06 01:48:57 acorliss Exp $
SYNOPSIS
$rv = deepCopy($source, $target); $rv = deepCopy(@source, @target); $rv = deepCopy(%source, %target); $rv = deepCmp($source, $target); $rv = deepCmp(@source, @target); $rv = deepCmp(%source, %target);
DESCRIPTION
This module provides data manipulation functions, which at this time only consists of deepCopy and deepCmp.
SUBROUTINES/METHODS
deepCopy $rv = deepCopy($source, $target); $rv = deepCopy(@source, @target); $rv = deepCopy(%source, %target); This function performs a deep and safe copy of arbitrary data structures, checking for circular references along the way. Hashes and lists are safely duplicated while all other data types are just copied. This means that any embedded object references, etc., are identical in both the source and the target, which is probably not what you want. In short, this should only be used on pure hash/list/scalar value data structures. Both the source and the target data types must be of an identical type. This function returns the number of elements copied unless it runs into a problem (such as a circular reference), in which case it returns a zero. deepCmp $rv = deepCmp($source, $target); $rv = deepCmp(@source, @target); $rv = deepCmp(%source, %target); This function performs a deep comparison of arbitrarily complex data structures (i.e., hashes of lists of lists of scalars, etc.). It returns true if the values of the structures are identical, false otherwise. Like the deepCopy function there are no provisions for evaluating objects beyond what their values are when coerced as scalar types. End sum, the same caveats that applied to deepCopy apply here.
DEPENDENCIES
o Carp o Paranoid o Paranoid::Debug
BUGS AND LIMITATIONS
AUTHOR
Arthur Corliss (corliss@digitalmages.com)
LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information. (c) 2005 - 2017, Arthur Corliss (corliss@digitalmages.com)