reverting (most of) the whitespace changes
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Action.pm
index 9815391..0e2bb58 100644 (file)
@@ -10,7 +10,7 @@ Catalyst::Action - Catalyst Action
 
 =head1 DESCRIPTION
 
-This class represents a Catalyst Action. You can access the object for the
+This class represents a Catalyst Action. You can access the object for the 
 currently dispatched action via $c->action. See the L<Catalyst::Dispatcher>
 for more information on how actions are dispatched. Actions are defined in
 L<Catalyst::Controller> subclasses.
@@ -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__