From: Sebastian Riedel Date: Mon, 28 Mar 2005 20:56:26 +0000 (+0000) Subject: fixed forward X-Git-Tag: 5.7099_04~1667 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=89c5fe2ddceec475f29a1afbd492c2be57a12112 fixed forward --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index ec4842b..aa020d8 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -266,7 +266,11 @@ sub forward { } my $caller = caller(0); my $namespace = '/'; - if ( $command =~ /^\/(.*)$/ ) { $command = $1 } + if ( $command =~ /^\/$/ ) { + $command =~ /^(.*)\/(\w+)$/; + $namespace = $1 || '/'; + $command = $2; + } else { $namespace = _class2prefix($caller) || '/' } my $results = $c->get_action( $command, $namespace ); unless ( @{$results} ) {