MooX::...Numeric(3pm)

πŸ“¦
version 1.03 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 (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