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=8c86df05df0c2586dea499936b990927cddc443c;hp=aa1abf85cdc3248aef075e1b56fde274fe102246;hb=79b7db20af61e914389b144e57bb7edfd107743c;hpb=90102012feccf317d3ed075ea8dc04c2cee95fb5 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index aa1abf8..8c86df0 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -120,6 +120,8 @@ has args_constraints => ( my @arg_protos = @{$self->attributes->{Args}||[]}; return [] unless scalar(@arg_protos); + return [] unless defined($arg_protos[0]); + # If there is only one arg and it looks like a number # we assume its 'classic' and the number is the number of # constraints. @@ -187,6 +189,7 @@ has captures_constraints => ( my @arg_protos = @{$self->attributes->{CaptureArgs}||[]}; return [] unless scalar(@arg_protos); + return [] unless defined($arg_protos[0]); # If there is only one arg and it looks like a number # we assume its 'classic' and the number is the number of # constraints.