From: John Napiorkowski Date: Thu, 12 Mar 2015 18:42:11 +0000 (-0500) Subject: remove some potentially confusing syntax X-Git-Tag: 5.90089_002~46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=337a627ae26fbde968dce5feb4c81fe44f4f517d remove some potentially confusing syntax --- diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index d74e4e0..ca4996a 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -99,10 +99,9 @@ has args_constraints => ( ) { return \@args; } else { - # Allows Args(Int,Str) and Args(Str,2,Int) == Args(Str,Any,Any,Int) @args = map { Moose::Util::TypeConstraints::find_or_parse_type_constraint($_) || die "$_ is not a constraint!" } - map { looks_like_number($_) ? ('Any' x $_) : $_ } @arg_protos; + @arg_protos; } return \@args; diff --git a/t/arg_constraints.t b/t/arg_constraints.t index 1a56834..5e3a235 100644 --- a/t/arg_constraints.t +++ b/t/arg_constraints.t @@ -43,6 +43,11 @@ use Catalyst::Test 'MyApp'; } { + my $res = request '/an_int/aa'; + is $res->content, 'default'; +} + +{ my $res = request '/many_ints/1'; is $res->content, 'many_ints'; } @@ -62,10 +67,5 @@ use Catalyst::Test 'MyApp'; is $res->content, 'default'; } -{ - my $res = request '/an_int/aa'; - is $res->content, 'default'; -} - done_testing;