Test2:...Number(3perl)
π Test2::Compare::Number β bestie edition π
okay so this is a page from the Perl Programmers Reference Guide, and the module is Test2::Compare::Number(3perl). sit down, hydrate, let's get into it π«Ά
β¨ NAME β¨
Test2::Compare::Number β literally just compares two values as numbers π
πΈ DESCRIPTION πΈ
This lil guy is what you use when you wanna compare two numbers. that's the job. that's the whole job. π
and yes β you can also use it to check that two numbers are not the same. so versatile of it.
β οΈ note: this will fail if the received value is undefined. it must be a number, no cap. undefined said "not today" and the test said "bet" and now you fail. π
β οΈ also note: this will fail if the comparison generates a non-numeric value warning β and heads up, that warning will not be shown. why? because it must get a number. the warning stays silent since it would just report to a useless line and filename (embarrassing for everyone honestly, it's giving nothing). BUT β the test diagnostics do show both values, so you're not left completely in the dark. ππ
π₯ SOURCE π₯
the source code repository for Test2-Suite lives right here, bestie:
https://github.com/Test-More/test-more/
go look, it's iconic. β¨
π¦ 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/
sending you off with the deets: this was perl v5.44.0, dated 2026-10-17 β that's the Test2:...Number(3perl) page, and it ate. periodt. πβ¨π§
π¦ 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