Dispatcher::get_action no longer takes $c as a useless arg
Yuval Kogman [Wed, 9 Nov 2005 00:07:25 +0000 (00:07 +0000)]
lib/Catalyst.pm
lib/Catalyst/ActionContainer.pm
lib/Catalyst/Dispatcher.pm

index 2427601..fd2c65b 100644 (file)
@@ -988,7 +988,7 @@ Get an action in a given namespace.
 
 =cut
 
-sub get_action { my $c = shift; $c->dispatcher->get_action( $c, @_ ) }
+sub get_action { my $c = shift; $c->dispatcher->get_action( @_ ) }
 
 =item $c->get_actions( $action, $namespace )
 
index 14a2fcc..6e01e23 100644 (file)
@@ -31,7 +31,7 @@ See L<Catalyst>.
 =cut
 
 sub get_action {
-    my ( $self, $c, $name ) = @_;
+    my ( $self, $name ) = @_;
     return $self->actions->{$name} if defined $self->actions->{$name};
     return;
 }
index 4c6c139..e9ae03e 100644 (file)
@@ -192,12 +192,12 @@ sub prepare_action {
       if ( $c->debug && @args );
 }
 
-=item $self->get_action( $c, $action, $namespace )
+=item $self->get_action( $action, $namespace )
 
 =cut
 
 sub get_action {
-    my ( $self, $c, $name, $namespace ) = @_;
+    my ( $self, $name, $namespace ) = @_;
     return unless $name;
     $namespace ||= '';
     $namespace = '' if $namespace eq '/';
@@ -206,7 +206,7 @@ sub get_action {
 
     return unless @match;
 
-    if ( my $action = $match[-1]->get_action( $c, $name ) ) {
+    if ( my $action = $match[-1]->get_action( $name ) ) {
         return $action if $action->namespace eq $namespace;
     }
 }
@@ -223,7 +223,7 @@ sub get_actions {
 
     my @match = $self->get_containers($namespace);
 
-    return map { $_->get_action( $c, $action ) } @match;
+    return map { $_->get_action( $action ) } @match;
 }
 
 =item $self->get_containers( $namespace )