updated absolute/relative tests/classes to global/local.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index b65c22a..76ab83c 100644 (file)
@@ -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 );
@@ -346,7 +346,7 @@ sub setup_actions {
         my $uid = $parent->getUID;
         for my $action ( keys %{ $actions->{private}->{$uid} } ) {
             my ( $class, $code ) = @{ $actions->{private}->{$uid}->{$action} };
-            $privates->addRow( "$prefix$action", $class, 37 );
+            $privates->addRow( "$prefix$action", $class );
         }
         $walker->( $walker, $_, $prefix ) for $parent->getAllChildren;
     };