1 package MooseX::Types::TypeDecorator;
4 use Moose::Util::TypeConstraints;
5 use Moose::Meta::TypeConstraint ();
9 shift->type_constraint->name;
15 MooseX::Types::TypeDecorator - More flexible access to a Type Constraint
19 This is a decorator object that contains an underlying type constraint. We use
20 this to control access to the type constraint and to add some features.
24 The following types are defined in this class.
26 =head2 Moose::Meta::TypeConstraint
28 Used to make sure we can properly validate incoming type constraints.
32 class_type 'Moose::Meta::TypeConstraint';
34 =head2 MooseX::Types::UndefinedType
36 Used since sometimes our constraint is an unknown type.
40 class_type 'MooseX::Types::UndefinedType';
44 This class defines the following attributes
46 =head2 type_constraint
48 This is the type constraint that we are delegating
52 has 'type_constraint' => (
54 isa=>'Moose::Meta::TypeConstraint|MooseX::Types::UndefinedType',
56 Moose::Meta::TypeConstraint->meta->compute_all_applicable_methods,
57 "_compiled_type_constraint",
63 This class defines the following methods.
65 =head1 AUTHOR AND COPYRIGHT
67 John Napiorkowski (jnapiorkowski) <jjnapiork@cpan.org>
71 This program is free software; you can redistribute it and/or modify
72 it under the same terms as perl itself.