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 π
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