X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=b5e75d404f252223927cf571f801b53653519e86;hb=75ce30d0f208d49ead0134ab45fc2f45f72d6023;hp=ec30c7ab50522295de95fb17d405f32d961a8158;hpb=25ca36c2fb3547600772a73c722a30b469ad632f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index ec30c7a..b5e75d4 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -92,6 +92,7 @@ has number_of_args_constraints => ( } else { # Its a Reftype but we don't know the number of params it # actually validates. + warn "Your type constraint '$tc' is a reference type but I cannot determine its number of parameters in action ${\$self->private_path}"; return undef; } } else { @@ -211,8 +212,11 @@ has captures_constraints => ( sub resolve_type_constraint { my ($self, $name) = @_; my @tc = eval "package ${\$self->class}; $name"; - return @tc if $tc[0]; - return Moose::Util::TypeConstraints::find_or_parse_type_constraint($name); + if($tc[0]) { + return map { ref($_) ? $_ : Moose::Util::TypeConstraints::find_or_parse_type_constraint($_) } @tc; + } else { + return; + } } has number_of_captures => ( @@ -408,8 +412,7 @@ makes the chain not match (and alternate, less preferred chains will be attempte =head2 match_args($c, $args) -Underlying feature that does the 'match' work, but doesn't require a context to -work (like 'match' does.). +Does the Args match or not? =head2 resolve_type_constraint