Fixed arguments debug message
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index c6eed9e..acd1b59 100644 (file)
@@ -113,7 +113,7 @@ sub forward {
                 if ($result) {
                     $local_args = 1;
                     $command    = $tail;
-                    push( @{$arguments}, @extra_args );
+                    unshift( @{$arguments}, @extra_args );
                     last DESCEND;
                 }
                 unshift( @extra_args, $tail );
@@ -194,10 +194,12 @@ sub prepare_action {
         }
 
         # If not, move the last part path to args
-
         unshift @args, pop @path;
     }
 
+    $c->log->debug( 'Path is "' . $c->req->match . '"' )
+      if ( $c->debug && $c->req->match );
+
     $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' )
       if ( $c->debug && @args );
 }