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=8e5ea75990178c49fa32edc7f7cdef5febcbd26d;hp=0002ef7e230e67ddd47bd5158486738a03fe105d;hb=1627551a60fe1e220d390a565f793dea27cd36a6;hpb=6a0648863b2a3a4a745dc701d422b954cadc05b0 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 0002ef7..8e5ea75 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -46,6 +46,16 @@ sub execute { # Execute ourselves against a context return $c->execute( $self->class, $self ); } +=head2 match + +=cut + +sub match { + my ( $self, $c ) = @_; + return 1 unless exists $self->attributes->{Args}; + return scalar(@{$c->req->args}) == $self->attributes->{Args}[0]; +} + =head2 namespace =head2 reverse