TEST2::COMPARE::REF(3perl)

πŸ’– NAME πŸ’–

Test2::Compare::Ref β€” it's the ref comparison one, bestie. Yes, that 3perl page. The whole vibe is "is this the exact same ref or not" and honestly it's iconic for it.


✨ DESCRIPTION ✨

Okay so here's the tea πŸ«–: this module gets used to compare two refs inside a deep comparison. That's the whole job. It's giving very focused, very demure, very "I do one thing and I slay at it" energy. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

my $ref = {};
my $check = Test2::Compare::Ref->new(input => $ref);

# Passes
is( [$ref], [$check], "The array contains the exact ref we want" );

# Fails, they both may be empty hashes, but we are looking for a specific
# reference.
is( [{}], [$check], "This will fail");

Notice how the second one is literally two empty hashes but still FAILS?? Yeah. Because it's not about being equal, it's about being the same ref. Not me getting emotionally attached to reference identity πŸ˜­πŸ¦‹


🌈 SOURCE 🌈

The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/.

Go be nosy, you're allowed 🫢


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

🌸 AUTHORS 🌸

  • Chad Granum <exodist@cpan.org>

(yes bestie, same name in both sections, that's just how the page is laid out, no cap ✨)


Copyright Chad Granum <exodist@cpan.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ“

See http://dev.perl.org/licenses/

Fr fr, read the license if you're gonna redistribute, it's literally right there πŸ’€

And that's the whole page, periodt. This lovely little writeup is from perl v5.44.0, dated 2026-10-17, and it lives at Test2::COMPARE::REF(3perl) β€” go forth and compare refs responsibly, bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms