Types::...Numeric(3)
π NAME π
okay so bestie, this is Types::Common::Numeric β a drop-in replacement for MooseX::Types::Common::Numeric. that's literally it, that's the whole name, slay. π
β¨ STATUS β¨
This module is covered by the Type-Tiny stability policy. iconic behavior honestly π«Ά
πΈ DESCRIPTION πΈ
A drop-in replacement for MooseX::Types::Common::Numeric. no notes, it just is the thing. π
π¦ Types π¦
The following types are similar to those described in MooseX::Types::Common::Numeric:
PositiveNumPositiveOrZeroNumPositiveIntPositiveOrZeroIntNegativeNumNegativeOrZeroNumNegativeIntNegativeOrZeroIntSingleDigit
not me being obsessed with this:SingleDigitinterestingly accepts the numbers-9to-1; not just0to9. the plot twist?? π the range is giving "both ends of the single-digit spectrum", periodt.
This module also defines an extra pair of type constraints not found in MooseX::Types::Common::Numeric. bestie they're NEW, they're exclusive to us π
IntRange[`min, `max]β type constraint for an integer between min and max. for example:
IntRange[1, 10]
the maximum can be omitted.
IntRange[10] # at least 10
the minimum and maximum are inclusive. both of them. no sneaky exclusions. β¨
NumRange[`min, `max]β type constraint for a number between min and max. for example:
NumRange[0.1, 10.0]
as with IntRange, the maximum can be omitted, and the minimum and maximum are inclusive. same energy fr fr.
exclusive ranges can be useful for non-integer values, so additional parameters can be given to make the minimum and maximum exclusive. iykyk:
NumRange[0.1, 10.0, 0, 0] # both inclusive
NumRange[0.1, 10.0, 0, 1] # exclusive maximum, so 10.0 is invalid
NumRange[0.1, 10.0, 1, 0] # exclusive minimum, so 0.1 is invalid
NumRange[0.1, 10.0, 1, 1] # both exclusive
making one of the limits exclusive means that a < or > operator will be used instead of the usual <= or >= operators. lowkey the strictest boundary enforcement ever π
π BUGS π
please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>. do it, bestie, the maintainers wanna hear from you π«Ά
π SEE ALSO π
Types::Standard, Types::Common::String.
MooseX::Types::Common, MooseX::Types::Common::Numeric, MooseX::Types::Common::String.
π AUTHOR π
Toby Inkster <tobyink@cpan.org>. main character, honestly. π
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2013-2014, 2017-2025 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in go off, do your thing π
πΊ DISCLAIMER OF WARRANTIES πΊ
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
okay that one's shouty because it MEANS it, no cap β no promises, no refunds, no vibes-based guarantees. π
and that's the whole page, bestie!! this was Types::...Numeric(3) from perl v5.42.0, dated 2026-01-17 β mwah, stan a classic, catch you in the next manpage π
πβ¨
π¦ where this page comes from
- fedora 44: perl-Type-Tiny 2.010001-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms