1MooseX::Types::Common::UNsuemrerCiocn(t3r)ibuted Perl DoMcouomseenXt:a:tTiyopnes::Common::Numeric(3)
2
3
4
6 MooseX::Types::Common::Numeric - Commonly used numeric types
7
9 use MooseX::Types::Common::Numeric qw/PositiveInt/;
10 has count => (is => 'rw', isa => PositiveInt);
11
12 ...
13 #this will fail
14 $object->count(-33);
15
17 A set of commonly-used numeric type constraints that do not ship with
18 Moose by default.
19
20 · PositiveNum
21
22 · PositiveOrZeroNum
23
24 · PositiveInt
25
26 · PositiveOrZeroInt
27
28 · NegativeNum
29
30 · NegativeOrZeroNum
31
32 · NegativeInt
33
34 · NegativeOrZeroInt
35
36 · SingleDigit
37
39 · MooseX::Types::Common::String
40
42 Please see:: MooseX::Types::Common
43
44
45
46perl v5.12.4 2011-08-31 MooseX::Types::Common::Numeric(3)