X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint%2FParameterizable.pm;h=bc3b9ce38ece5a3a00fc800d32d9df604e5065e0;hb=50bc108bca305ced4df63a569c9b5f3474f71914;hp=7b61ebb40840d960141e7574efae18b9422e24d2;hpb=1bb61d3a981058520ddb60d08a775afaa79e41d9;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeConstraint/Parameterizable.pm b/lib/Moose/Meta/TypeConstraint/Parameterizable.pm index 7b61ebb..bc3b9ce 100644 --- a/lib/Moose/Meta/TypeConstraint/Parameterizable.pm +++ b/lib/Moose/Meta/TypeConstraint/Parameterizable.pm @@ -4,13 +4,11 @@ use strict; use warnings; use metaclass; -our $VERSION = '0.57'; +our $VERSION = '0.59'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::TypeConstraint'; -use Moose::Meta::TypeConstraint::Parameterized; -use Moose::Util::TypeConstraints (); __PACKAGE__->meta->add_attribute('constraint_generator' => ( accessor => 'constraint_generator', @@ -42,27 +40,6 @@ sub _can_coerce_constraint_from { }; } -sub parse_type_parameter { - my ($self, $type_parameter) = @_; - return Moose::Util::TypeConstraints::find_or_create_isa_type_constraint($type_parameter); -} - -sub parameterize { - my ( $self, $contained_tc ) = @_; - - if ( $contained_tc->isa('Moose::Meta::TypeConstraint') ) { - my $tc_name = $self->name . '[' . $contained_tc->name . ']'; - return Moose::Meta::TypeConstraint::Parameterized->new( - name => $tc_name, - parent => $self, - type_parameter => $contained_tc, - ); - } - else { - Moose->throw_error("The type parameter must be a Moose meta type"); - } -} - 1; @@ -85,14 +62,6 @@ Moose::Meta::TypeConstraint::Parameterizable - Higher Order type constraints for =item B -=item B - -Given a string, convert it to a Perl structure. - -=item B - -Given an array of type constraints, parameterize the current type constraint. - =item B =back