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=0ddd7969234480861588cb01be1aed147529c9d0;hp=ce587ac95b808879e852fadcbd68431bd31b3a75;hb=141459fa3fc9852fd6f05138caddb410bbe2949c;hpb=a8762dd4f8ea1338b9b45ecf37c0107f2710d398 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index ce587ac..0ddd796 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -79,7 +79,9 @@ Check Args attribute, and makes sure number of args matches the setting. sub match { my ( $self, $c ) = @_; return 1 unless exists $self->attributes->{Args}; - return scalar( @{ $c->req->args } ) == $self->attributes->{Args}[0]; + my $args = $self->attributes->{Args}[0]; + return 1 unless defined($args) && length($args); + return scalar( @{ $c->req->args } ) == $args; } =head2 namespace