MakeMe...ty::Ref(3pm)

πŸ“¦
version 1.01 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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::MakeMethods for general information about this distribution.
  • See Ref for 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 a Compare method 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