X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FMeta%2FTypeConstraint%2FStructured.pm;h=0db946f9a5319d265867b26ff51c480ab8710575;hb=refs%2Fremotes%2Forigin%2Ftopics%2Fuse-compiled-constraints;hp=6f4a6fe308f3cc63a8e155dd44ff2af831483eb4;hpb=8c59dff8073f6ea8648c316ba36674f8eb476c55;p=gitmo%2FMooseX-Types-Structured.git diff --git a/lib/MooseX/Meta/TypeConstraint/Structured.pm b/lib/MooseX/Meta/TypeConstraint/Structured.pm index 6f4a6fe..0db946f 100644 --- a/lib/MooseX/Meta/TypeConstraint/Structured.pm +++ b/lib/MooseX/Meta/TypeConstraint/Structured.pm @@ -109,12 +109,7 @@ of values (to be passed at check time) sub generate_constraint_for { my ($self, $type_constraints) = @_; - return sub { - my $arg = shift @_; - my $constraint_generator = $self->constraint_generator; - my $result = $constraint_generator->($type_constraints, $arg, $_[0]); - return $result; - }; + return $self->constraint_generator->($self, $type_constraints); } =method parameterize (@type_constraints)