From: Stevan Little Date: Thu, 13 Dec 2007 08:22:54 +0000 (+0000) Subject: Type coercins needs to be able to create types; X-Git-Tag: 0_35~53 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25e1fed14c471c826f44a2f82b60ef627d1a05c0;p=gitmo%2FMoose.git Type coercins needs to be able to create types; --- diff --git a/lib/Moose/Meta/TypeCoercion.pm b/lib/Moose/Meta/TypeCoercion.pm index 4620c51..5bfd37e 100644 --- a/lib/Moose/Meta/TypeCoercion.pm +++ b/lib/Moose/Meta/TypeCoercion.pm @@ -43,7 +43,7 @@ sub compile_type_coercion { my @coercions; while (@coercion_map) { my ($constraint_name, $action) = splice(@coercion_map, 0, 2); - my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint($constraint_name); + my $type_constraint = Moose::Util::TypeConstraints::find_or_create_type_constraint($constraint_name); (defined $type_constraint) || confess "Could not find the type constraint ($constraint_name) to coerce from"; push @coercions => [