MakeMe...ty::Ref(3pm)
π NAME π
Okay bestie, this page is MakeMe...ty::Ref(3pm) from the User Contributed Perl Documentation, and the full glow-up is:
Class::MakeMethods::Utility::Ref β deep copying and comparison. It's giving utility-module excellence, no cap. β¨
πΈ SYNOPSIS πΈ
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 );
π¦ DESCRIPTION π¦
This module hands you utility functions to copy and compare arbitrary references, including full traversal of nested data structures. Like, it really goes in. π
π REFERENCE π
The following functions are provided, bestie:
ref_clone() π«Ά
Make a recursive copy of a reference.
ref_compare() β
Attempt to recursively compare two references.
If they are not the same, it tries to be consistent about returning a positive or negative number so it can be used for sorting. The sort order is kinda arbitrary β lowkey iconic, highkey chaotic. π
π SEE ALSO π
- See
Class::MakeMethodsfor general information about this distribution. - See
Reffor the original version of the clone and compare functions used above. - See
Clone(v0.09 on CPAN as of 2000-09-21) for a clone method with an XS implementation. - The Perl6 RFP #67 proposes including clone functionality in the core.
- See
Data::Compare(v0.01 on CPAN as of 1999-04-24) for aComparemethod which checks two references for similarity, but it does not provide positive/negative values for ordering purposes.
And that's the whole page, bestie β cute little sign-off with the source/version/date vibes: perl v5.36.0, dated 2022-10-13. Slay. ππβ¨
π¦ where this page comes from
- ubuntu noble: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms