From: Sebastian Riedel Date: Wed, 2 Mar 2005 19:09:35 +0000 (+0000) Subject: private prefixed actions override private actions X-Git-Tag: 5.7099_04~1794 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=7242d068c0151593c68d839b1289f98afbda8d59 private prefixed actions override private actions --- diff --git a/Changes b/Changes index 0db02ef..5fd22a9 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ This file documents the revision history for Perl extension Catalyst. 4.11 Wed Mar 02 11:00:00 2005 - removed some warnings - improved docs + - private prefixed actions override private non prefixed actions 4.10 Wed Mar 02 10:00:00 2005 - improved documentation diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 5ef4639..83e7efb 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -337,6 +337,13 @@ sub forward { $command = _prefix( $caller, $command ); $command = "\!$command"; } + elsif ( $command =~ /^\!(.*)$/ ) { + my $try = $1; + my $caller = caller(0); + my $prefix = _class2prefix($caller); + $try = "!$prefix/$command"; + $command = $try if $c->actions->{plain}->{$try}; + } my ( $class, $code ); if ( my $action = $c->action($command) ) { ( $class, $code ) = @{ $action->[0] };