MooX::...Numeric(3pm)
π MooX::Types::MooseLike::Numeric π
okay bestie, so this is a page from the User Contributed Perl Documentation, and the manual we're reading is MooX::...Numeric(3pm) β yeah the title got truncated by the pager, it's giving β¨mysteriousβ¨ but it's really just MooX::Types::MooseLike::Numeric. Let's get into it π«Ά
β¨ NAME β¨
MooX::Types::MooseLike::Numeric β Moo types for numbers π’π
πΈ SYNOPSIS πΈ
like, here's the whole vibe in one little code block:
package MyPackage;
use Moo;
use MooX::Types::MooseLike::Numeric qw(PositiveInt);
has "daily_breathes" => (
is => 'rw',
isa => PositiveInt
);
see how easy that was?? import the type, slap it in isa, boom, your attribute is now validated and you didn't even break a sweat π
π¦ DESCRIPTION π¦
so basically this is a set of numeric types to be used in Moo-based classes. it's adapted from MooseX::Types::Common::Numeric β so if you already know that one, you already know this one. it's the same energy, just for Moo. no cap. β¨
π TYPES (subroutines) π
the available types are listed below, and yes, they're all just subroutines under the hood, that's the whole trick π
PositiveNumβ a positive number bestie, numbers only πPositiveOrZeroNumβ positive... or zero. so, zero and up. generous of her honestly π«ΆPositiveIntβ positive integer, whole numbers only, no decimals invited to this party πPositiveOrZeroIntβ positive integer or zero. the chill one. the "0 is fine" one πΈNegativeNumβ negative number, going down and thriving πNegativeOrZeroNumβ negative number, or zero. 0 gets a pass again π¦NegativeIntβ negative integer, whole and sad and iconic πNegativeOrZeroIntβ negative integer or zero. 0 stays winning π§SingleDigitβ a single digit, iykyk β
ngl, that's the entire list. nine types. no hidden ones. no secret ones. this is the whole menu π
π SEE ALSO π
go read these next bestie, they're all friends of hers:
MooX::Types::MooseLikeβ a type builder π¨MooX::Types::MooseLike::Baseβ a set of basic types π§±MooX::Types::MooseLike::Email,MooX::Types::MooseLike::DateTimeπ§π°οΈ
π AUTHOR π
mateu β Mateu X. Hunter (cpan:MATEU) <hunter@missoula.org> π
π«Ά CONTRIBUTORS π«Ά
amidos β Dmitry Matrosov (cpan:AMIDOS) <amidos@amidos.ru> β
π COPYRIGHT π
Copyright (c) 2011-2015 the MooX::Types::MooseLike::Numeric "AUTHOR" πΈ
π LICENSE π
This library is free software and may be distributed under the same terms as perl itself. periodt. π
and that's the whole page bestie, slay π this manual was rendered by perl v5.34.0 on 2022-06-16, so yeah, she's got a timestamp and everything β MooX::...Numeric(3pm), signing off πβ¨
π¦ where this page comes from
- debian bookworm: libmoox-types-mooselike-numeric-perl 1.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoox-types-mooselike-numeric-perl 1.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoox-types-mooselike-numeric-perl 1.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoox-types-mooselike-numeric-perl 1.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoox-types-mooselike-numeric-perl 1.03-2 Β· 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