X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=ea3e3e49e820122e5fa612ef6e5657cb54de067e;hp=3497e21ec59bb1678efa1816cf4965a86a7f5c9c;hb=161710a39409d2afd256463471b8014a1c69adf4;hpb=b8373df33c55813aeee1cc09c8fa0056846a7a6e diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 3497e21..ea3e3e4 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -52,7 +52,9 @@ has number_of_args => ( if( ! exists $self->attributes->{Args} ) { # When 'Args' does not exist, that means we want 'any number of args'. return undef; - } elsif(!defined($self->attributes->{Args}[0])) { + } elsif( + !defined($self->attributes->{Args}[0]) || + $self->attributes->{Args}[0] eq '' ) { # When its 'Args' that internal cue for 'unlimited' return undef; } elsif( @@ -138,6 +140,7 @@ has args_constraints => ( return [] unless scalar(@arg_protos); return [] unless defined($arg_protos[0]); + return [] if ($arg_protos[0] eq '' && scalar(@arg_protos) == 1); # If there is only one arg and it looks like a number # we assume its 'classic' and the number is the number of