Class::MakeMethods::Utility::Ref(3pm)

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.

  1. 4.0–5.0
  2. 6.0–8
  3. 9–11
  4. 12–13

From libclass-makemethods-perl 1.01-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.