X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FMeta%2FTypeCoercion%2FParameterizable.pm;h=69600927fd941b1cb2d9a6bbf972204c5e0a327d;hb=98d12747174fea12282d4010278978b389b5ad1e;hp=6a07ac6221b8e6a5dda998367e08b8d5d605f54e;hpb=ca01e833d59b1af84a52e2c10ae62ede34d6f169;p=gitmo%2FMooseX-Dependent.git diff --git a/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm index 6a07ac6..6960092 100644 --- a/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm @@ -39,6 +39,7 @@ around 'add_type_coercions' => sub { ## These two are here until I can merge change upstream to Moose. These are two ## very minor changes we can probably just put into Moose without breaking stuff + sub coerce { my $self = shift @_; my $coderef = $self->_compiled_type_coercion; @@ -51,7 +52,10 @@ sub compile_type_coercion { my @coercions; while (@coercion_map) { my ($constraint_name, $action) = splice(@coercion_map, 0, 2); - my $type_constraint = ref $constraint_name ? $constraint_name : Moose::Util::TypeConstraints::find_or_parse_type_constraint($constraint_name); + + my $type_constraint = ref $constraint_name + ? $constraint_name + : Moose::Util::TypeConstraints::find_or_parse_type_constraint($constraint_name); unless ( defined $type_constraint ) { require Moose;