MooseX::Types::Moose - Types shipped with Moose
package Foo; use Moose; use MooseX::Types::Moose qw( Int Str ); use Carp qw( croak ); has 'name', is => 'rw', isa => Str; has 'id', is => 'rw', isa => Int; sub add { my ($self, $x, $y) = @_; croak 'First arg not an Int' unless is_Int($x); croak 'Second arg not an Int' unless is_Int($y); return $x + $y; } 1;
This package contains a virtual library for MooseX::Types that is able to export all types known to Moose. See MooseX::Types for general usage information.
Overrides MooseX::Types::Base' type_storage to provide a hash reference containing all built-in Moose types.
type_storage
MooseX::Types::Moose, Moose, Moose::Util::TypeConstraints
Robert 'phaylon' Sedlacek <rs@474.at>, with many thanks to the #moose cabal on irc.perl.org.
<rs@474.at>
#moose
irc.perl.org
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
To install MooseX::Types, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Types
CPAN shell
perl -MCPAN -e shell install MooseX::Types
For more information on module installation, please visit the detailed CPAN module installation guide.