Paranoid::Data - Misc. Data Manipulation Functions


Paranoid documentation  | view source Contained in the Paranoid distribution.

Index


NAME

Top

Paranoid::Data - Misc. Data Manipulation Functions

VERSION

Top

$Id: Data.pm,v 0.02 2010/04/15 23:23:28 acorliss Exp $

SYNOPSIS

Top

    $rv = deepCopy($sourceRef, $targetRef);

DESCRIPTION

Top

This module provides data manipulation functions, which at this time only consists of deepCopy.

SUBROUTINES/METHODS

Top

deepCopy

    $rv = deepCopy($sourceRef, $targetRef);

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 reference 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.

DEPENDENCIES

Top

o

Paranoid::Debug

BUGS AND LIMITATIONS

Top

AUTHOR

Top

Arthur Corliss (corliss@digitalmages.com)

LICENSE AND COPYRIGHT

Top


Paranoid documentation  | view source Contained in the Paranoid distribution.