Scroll to navigation

MooseX::Types::Common::Numeric(3pm) User Contributed Perl Documentation MooseX::Types::Common::Numeric(3pm)

NAME

MooseX::Types::Common::Numeric - Commonly used numeric types

SYNOPSIS

    use MooseX::Types::Common::Numeric qw/PositiveInt/;
    has count => (is => 'rw', isa => PositiveInt);
    ...
    #this will fail
    $object->count(-33);

DESCRIPTION

A set of commonly-used numeric type constraints that do not ship with Moose by default.
PositiveNum
PositiveOrZeroNum
PositiveInt
PositiveOrZeroInt
NegativeNum
NegativeOrZeroNum
NegativeInt
NegativeOrZeroInt
SingleDigit

SEE ALSO

MooseX::Types::Common::String

AUTHORS

Please see:: MooseX::Types::Common
2012-06-14 perl v5.14.2