X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=0ddd7969234480861588cb01be1aed147529c9d0;hb=908e3d9e7a61974b3807b7ab37862550452b2456;hp=ce587ac95b808879e852fadcbd68431bd31b3a75;hpb=b8f669f3c51dab87bfe9387dbaac0c07027abcfd;p=catagits%2FCatalyst-Runtime.git 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