From: Yuval Kogman Date: Wed, 9 Nov 2005 00:07:25 +0000 (+0000) Subject: Dispatcher::get_action no longer takes $c as a useless arg X-Git-Tag: 5.7099_04~990 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=bcd1002b0ed8c8fe6dbfdc94417be0fe8cd52832 Dispatcher::get_action no longer takes $c as a useless arg --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 2427601..fd2c65b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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 ) diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index 14a2fcc..6e01e23 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -31,7 +31,7 @@ See L. =cut sub get_action { - my ( $self, $c, $name ) = @_; + my ( $self, $name ) = @_; return $self->actions->{$name} if defined $self->actions->{$name}; return; } diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 4c6c139..e9ae03e 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -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 )