From: Sebastian Riedel Date: Thu, 14 Apr 2005 12:57:57 +0000 (+0000) Subject: fixed bug before draven finished test case :P X-Git-Tag: 5.7099_04~1542 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db0ca23c11618e21c48e399a0fcc889547939e67;p=catagits%2FCatalyst-Runtime.git fixed bug before draven finished test case :P --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index fb48acf..76ab83c 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -114,10 +114,10 @@ sub forward { my $caller = caller(0); my $namespace = '/'; if ( $command =~ /^\// ) { - $command =~ /^(.*)\/(\w+)$/; + $command =~ /^\/(.*)\/(\w+)$/; $namespace = $1 || '/'; - $namespace = s/^\/// if $namespace ne '/'; - $command = $2; + $command = $2 || $command; + $command =~ s/^\///; } else { $namespace = _class2prefix($caller) || '/' } my $results = $c->get_action( $command, $namespace );