MooseX...umeric(3pm)
π MooseX::Types::Common::Numeric π
okay bestie, so this is MooseX::Types::Common::Numeric β the manual page, the whole vibe, and it's version 0.001015 in case you were wondering which era of this we're living in. πΈ
β¨ SYNOPSIS β¨
like, here's the whole thing in action, no notes:
use MooseX::Types::Common::Numeric qw/PositiveInt/;
has count => (is => 'rw', isa => PositiveInt);
...
#this will fail
$object->count(-33);
and yeah, that -33? it will literally fail. the comment says so. we don't make the rules, we just read them. π
π¦ DESCRIPTION π¦
so Moose ships with a bunch of type constraints, right? but it does not ship with these ones. so this module is the friend that shows up with the snacks. it's a set of commonly-used numeric type constraints that don't come standard, and here's the full roster, no one left out:
PositiveNumPositiveOrZeroNumPositiveIntPositiveOrZeroIntNegativeNumNegativeOrZeroNumNegativeIntNegativeOrZeroIntSingleDigit
nine of them. iconic lineup honestly. π
π SEE ALSO π
MooseX::Types::Common::Stringβ its sibling, same energy, different data type π
π«Ά SUPPORT π«Ά
found a bug? first of all, relatable. second of all, bestie, you can submit it through the RT bug tracker:
https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-Common
or you can email it straight to:
bug-MooseX-Types-Common@rt.cpan.org
there's also a mailing list for users of this distribution, hanging out at:
http://lists.perl.org/list/moose.html
and if you wanna just. talk. live. there's an irc channel for users of this distribution at #moose on irc.perl.org β that's irc://irc.perl.org/#moose if you need the link format. come thru, the water's fine. π
π AUTHORS π
the legends responsible for this whole thing:
- Matt S Trout β
mst (at) shadowcat.co.uk(https://www.shadowcat.co.uk/) - K. James Cheetham β
<jamie@shadowcat.co.uk> - Guillermo Roditi β
<groditi@gmail.com>
say thank you. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2009 by Matt S Trout - mst (at) shadowcat.co.uk (https://www.shadowcat.co.uk/).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. π β¨
and that's the whole page, bestie β every type, every link, every author, nothing skipped, nothing invented. π§
perl v5.40.1 Β· 2025-04-24 β that's the version and the date this page was built, so if you're reading it in the future, hi, hope Perl is thriving. ππ
π¦ where this page comes from
- debian trixie: libmoosex-types-common-perl 0.001015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-types-common-perl 0.001015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-types-common-perl 0.001015-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