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
Paranoid::Data(3) User Contributed Perl Documentation Paranoid::Data(3)

Paranoid::Data - Misc. Data Manipulation Functions

$Id: lib/Paranoid/Data.pm, 2.08 2020/12/31 12:10:06 acorliss Exp $

    $rv = deepCopy($source, $target);
    $rv = deepCopy(@source, @target);
    $rv = deepCopy(%source, %target);

    $rv = deepCmp($source, $target);
    $rv = deepCmp(@source, @target);
    $rv = deepCmp(%source, %target);

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

This module exports the following symbols by default:

    deepCopy deepCmp

The following specialized import lists also exist:

    List        Members
    --------------------------------------------------------
    all         @defaults

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

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

o
Carp
o
Paranoid
o
Paranoid::Debug

Arthur Corliss (corliss@digitalmages.com)

This software is free software. Similar to Perl, you can redistribute it and/or modify it under the terms of either:

  a)     the GNU General Public License
         <https://www.gnu.org/licenses/gpl-1.0.html> as published by the 
         Free Software Foundation <http://www.fsf.org/>; either version 1
         <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version
         <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
  b)     the Artistic License 2.0
         <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: No trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. However, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)

2020-12-31 perl v5.32.1

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

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