1MooseX::Types::Moose(3)User Contributed Perl DocumentatioMnooseX::Types::Moose(3)
2
3
4

NAME

6       MooseX::Types::Moose - Types shipped with Moose
7

SYNOPSIS

9         package Foo;
10         use Moose;
11         use MooseX::Types::Moose qw( Int Str );
12         use Carp qw( croak );
13
14         has 'name',
15           is  => 'rw',
16           isa => Str;
17
18         has 'id',
19           is  => 'rw',
20           isa => Int;
21
22         sub add {
23             my ($self, $x, $y) = @_;
24             croak 'First arg not an Int'  unless is_Int($x);
25             croak 'Second arg not an Int' unless is_Int($y);
26             return $x + $y;
27         }
28
29         1;
30

DESCRIPTION

32       This package contains a virtual library for MooseX::Types that is able
33       to export all types known to Moose. See MooseX::Types for general usage
34       information.
35

METHODS

37   type_storage
38       Overrides MooseX::Types::Base' "type_storage" to provide a hash
39       reference containing all built-in Moose types.
40

SEE ALSO

42       MooseX::Types::Moose, Moose, Moose::Util::TypeConstraints
43

AUTHOR

45       See "AUTHOR" in MooseX::Types.
46

LICENSE

48       This program is free software; you can redistribute it and/or modify it
49       under the same terms as perl itself.
50
51
52
53perl v5.12.1                      2010-06-01           MooseX::Types::Moose(3)
Impressum