MouseX:...Numeric(3)

πŸ“¦
version 0.001000 Β· 3 versions
, in epel 10

🌸 NAME 🌸

okay so bestie, this is the MouseX:...Numeric(3) page from User Contributed Perl Documentation β€” folding that header info in right here instead of copying the line, iykyk πŸ’….

MouseX::Types::Common::Numeric β€” a set of commonly-used numeric type constraints. periodt. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the group-chat demo, literally:

use MouseX::Types::Common::Numeric qw/PositiveInt/;
has count => (is => 'rw', isa => PositiveInt);

...
#this will fail
$object->count(-33);

the last bit is the fail case, and the code comment itself says #this will fail 😭 β€” not me, that's the original's own warning, fr fr.


πŸ’– DESCRIPTION πŸ’–

a set of commonly-used numeric type constraints that do not ship with Mouse by default. no cap, here's the whole lineup:

  • PositiveNum
  • PositiveInt
  • NegativeNum
  • Int
  • SingleDigit

the whole numeric squad, assembled πŸŒˆπŸ‘‘


🌈 SEE ALSO 🌈

also go peek at this one, bestie:

  • MouseX::Types::Common::String

🫢 AUTHORS 🫢

the authors section just says: Please see:: MouseX::Types::Common β€” yes, with the double colon, copy it exactly, okay? πŸŽ€


xoxo, your fave numeric type-constraint page πŸ’… β€” source/version perl v5.40.0, dated 2024-07-19, footer title MouseX:...Numeric(3). mwah πŸ’‹

πŸ“¦ where this page comes from