1 package MooseX::Types::TypeDecorator;
8 shift->type_constraint->name;
14 MooseX::Types::TypeDecorator - More flexible access to a Type Constraint
18 This is a decorator object that contains an underlying type constraint. We use
19 this to control access to the type constraint and to add some features.
23 This class defines the following methods.
27 Old school instantiation
32 my ($class, %args) = @_;
33 return bless \%args, $class;
36 =head type_constraint ($type_constraint)
38 Set/Get the type_constraint
44 if(my $tc = shift @_) {
45 $self->{type_constraint} = $tc;
47 return $self->{type_constraint};
52 We might need it later
62 Delegate to the decorator targe
68 my ($method) = (our $AUTOLOAD =~ /([^:]+)$/);
69 return shift->type_constraint->$method(@_);
72 =head1 AUTHOR AND COPYRIGHT
74 John Napiorkowski (jnapiorkowski) <jjnapiork@cpan.org>
78 This program is free software; you can redistribute it and/or modify
79 it under the same terms as perl itself.