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=a1e2e41b36d28dd6b49f081fbb3542e3fbcab881;hp=9815391eb627fca36c04d8f08251d089dc0d4b8c;hb=e5ecd5bc38bac3e2fcfaf643ea2a4c6ab46d7e57;hpb=7fa2c9c1b85c98786655ad5169708d8dc84e8353 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 9815391..a1e2e41 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -67,12 +67,17 @@ sub execute { sub match { my ( $self, $c ) = @_; + #would it be unreasonable to store the number of arguments + #the action has as it's own attribute? + #it would basically eliminate the code below. ehhh. small fish return 1 unless exists $self->attributes->{Args}; my $args = $self->attributes->{Args}[0]; return 1 unless defined($args) && length($args); return scalar( @{ $c->req->args } ) == $args; } +__PACKAGE__->meta->make_immutable; + 1; __END__