Number...nstant(3pm)
π Number::Tolerant::Constant β a blessed constant type π
okay bestie, so this is a page from the User Contributed Perl Documentation set, filed under Number...nstant(3pm) (the man name is truncated, it's giving β¨abbreviatedβ¨, the real one is Number::Tolerant::Constant). Let's get into it π«Ά
β¨ VERSION β¨
version 1.710 β that's the one, no cap πΈ
π SYNOPSIS π
use Number::Tolerant;
use Number::Tolerant::Constant;
my $range = tolerance(10);
ref $range; # "Number::Tolerant" -- w/o ::Constant, would be undef
so like. without ::Constant that ref would be undef π with it? you get a whole "Number::Tolerant" object. iconic behavior, honestly π
π DESCRIPTION π
Here's the tea β When Number::Tolerant is about to hand you back a tolerance that has zero variation, it doesn't give you a tolerance β it gives you a constant instead. Rude? A little. But this module is the fix π
This module registers a constant type that catches those constants and returns them as Number::Tolerant objects instead. so like. the constant gets scooped up and reblessed into something you can actually use π
and why did the author even write this? literally to make tolerances play nice with Class::DBI β because Class::DBI would otherwise be like "um excuse me, the constructor did not return a blessed object???" π and complain. so yeah, this whole module exists to stop that complaint. main character problem-solving energy fr fr β¨
π§ PERL VERSION π§
ngl this part is lowkey wholesome π₯Ή This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
okay but real talk β even though it may work on older versions of perl, there's no guarantee that the minimum required version won't get raised. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come for them about it π
π AUTHOR π
Ricardo Signes <cpan@semiotic.systems> π«Ά
πΈ COPYRIGHT AND LICENSE πΈ
This software is copyright (c) 2004 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, legally speaking π
and that's the whole page bestie, you ate that reading assignment π β¨
cute little sign-off: this was rendered from perl v5.36.0, dated 2023-01-08, and filed under that truncated Number...nstant(3pm) name we mentioned at the top ππ¦
π¦ where this page comes from
- debian bookworm: libnumber-tolerant-perl 1.710-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnumber-tolerant-perl 1.710-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnumber-tolerant-perl 1.710-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnumber-tolerant-perl 1.710-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnumber-tolerant-perl 1.710-1 Β· Artistic-1.0-Perl OR 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