Test2:...Scalar(3perl)
π Test2::Compare::Scalar π
okay bestie, so this is Test2::Compare::Scalar from the Perl Programmers Reference Guide (the manpage name is literally Test2:...Scalar(3perl), it's giving abbreviated section name energy and we love her for it) π
β¨ NAME β¨
Test2::Compare::Scalar β it's the Representation of a Scalar Ref in deep comparisons, no cap π¦
πΈ DESCRIPTION πΈ
so basically?? this little icon right here gets used inside deep comparisons to represent a scalar reference. that's it. that's the job. she shows up, she represents a scalar ref, she serves. periodt π
β SYNOPSIS β
here's the whole vibe, copy-paste ready, not a single character changed:
my $sr = Test2::Compare::Scalar->new(item => 'foo');
is([\'foo'], $sr, "pass");
is([\'bar'], $sr, "fail, different value");
is(['foo'], $sr, "fail, not a ref");
look at her go π«Ά first line: we make the thing. then three tests, and the way that the results shake out is genuinely so satisfying:
is([\'foo'], $sr, "pass");β this one ate, it passes πis([\'bar'], $sr, "fail, different value");β fails, because the value is different. the audacity πis(['foo'], $sr, "fail, not a ref");β fails, because bestieβ¦ that's not a ref. not even close π
π₯ SOURCE π₯
the source code repository for Test2-Suite lives right here, go be nosy:
https://github.com/Test-More/test-more/
π MAINTAINERS π
- Chad Granum
<exodist@cpan.org>
π AUTHORS π
- Chad Granum
<exodist@cpan.org>
π 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/
lowkey important, highkey iconic: all of that licensing text above is the real deal, don't skip it just because the vibe is cute π
okay that's the whole page, and now the cute sign-off: this was perl v5.44.0, dated 2026-10-17, and the manual name is Test2:...Scalar(3perl) β main character energy, fr fr βπ
πΈ
π¦ 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