logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooX::Types::MooseLike::Numeric - Moo types for numbers

Author

       mateu - Mateu X. Hunter (cpan:MATEU) <hunter@missoula.org>

Contributors

       amidos - Dmitry Matrosov (cpan:AMIDOS) <amidos@amidos.ru>

Description

       A set of numeric types to be used in Moo-based classes. Adapted from MooseX::Types::Common::Numeric

License

       This library is free software and may be distributed under the same terms as perl itself.

perl v5.34.0                                       2022-06-16               MooX::Types::MooseLike::Numeric(3pm)

Name

       MooX::Types::MooseLike::Numeric - Moo types for numbers

See Also

       MooX::Types::MooseLike - a type builder.

       MooX::Types::MooseLike::Base - a set of basic types.

       MooX::Types::MooseLike::Email, MooX::Types::MooseLike::DateTime

Synopsis

         package MyPackage;
         use Moo;
         use MooX::Types::MooseLike::Numeric qw(PositiveInt);

         has "daily_breathes" => (
           is  => 'rw',
           isa => PositiveInt
         );

Types (Subroutines)

       Available types are listed below.

       PositiveNum
       PositiveOrZeroNum
       PositiveInt
       PositiveOrZeroInt
       NegativeNum
       NegativeOrZeroNum
       NegativeInt
       NegativeOrZeroInt
       SingleDigit

See Also