- Fix go / visit expecting captures and arguments in reverse order.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 3d6573b..93c0d93 100644 (file)
@@ -131,7 +131,7 @@ sub _command2action {
     my (@args, @captures);
 
     if ( ref( $extra_params[-2] ) eq 'ARRAY' ) {
-        @captures = @{ pop @extra_params };
+        @captures = @{ splice @extra_params, -2, 1 };
     }
 
     if ( ref( $extra_params[-1] ) eq 'ARRAY' ) {