Class::MakeMethods::Utility::Ref3pm
Deep copying and comparison
Usage
use Class::MakeMethods::Utility::Ref qw( ref_clone ref_compare );$deep_copy = ref_clone( $original );$positive_zero_or_negative = ref_compare( $item_a, $item_b );
Overview
This module provides utility functions to copy and compare arbitrary references, including full traversal of nested data structures.
Reference
The following functions are provided:
ref_clone()
Make a recursive copy of a reference.
ref_compare()
Attempt to recursively compare two references.
If they are not the same, try to be consistent about returning a positive or negative number so that it can be used for sorting. The sort order is kinda arbitrary.
Releases
10 releases since Debian 4.0 (Etch); the text changed 3 times.