private prefixed actions override private actions
Sebastian Riedel [Wed, 2 Mar 2005 19:09:35 +0000 (19:09 +0000)]
Changes
lib/Catalyst/Engine.pm

diff --git a/Changes b/Changes
index 0db02ef..5fd22a9 100644 (file)
--- 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
index 5ef4639..83e7efb 100644 (file)
@@ -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] };