[Catalyst-commits] r11398 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst t/aggregate

gbjk at dev.catalyst.perl.org gbjk at dev.catalyst.perl.org
Mon Sep 21 14:05:17 GMT 2009


Author: gbjk
Date: 2009-09-21 14:05:17 +0000 (Mon, 21 Sep 2009)
New Revision: 11398

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
   Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t
   Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t
Log:
- Fix go / visit expecting captures and arguments in reverse order.


Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-09-20 14:01:51 UTC (rev 11397)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-09-21 14:05:17 UTC (rev 11398)
@@ -10,6 +10,7 @@
        method.
      - Require new Moose version and new versions of various dependencies
        to avoid warnings from newest Moose release.
+     - Fix go / visit expecting captures and arguments in reverse order.
 
   Documentation:
      - Rework the $c->go documentation to make it more clear.

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm	2009-09-20 14:01:51 UTC (rev 11397)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm	2009-09-21 14:05:17 UTC (rev 11398)
@@ -131,7 +131,7 @@
     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' ) {

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t	2009-09-20 14:01:51 UTC (rev 11397)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t	2009-09-21 14:05:17 UTC (rev 11398)
@@ -262,7 +262,7 @@
         ok( my $response = request('http://localhost/action/go/go_chained'), 'go to chained + subcontroller endpoint' );
         is( $response->header('X-Catalyst-Executed'),
             $expected, 'Executed actions' );
-        is( $response->content, 'arg1, arg2; captureme', 'Content OK' );
+        is( $response->content, 'captureme; arg1, arg2', 'Content OK' );
     }
 
 }

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t	2009-09-20 14:01:51 UTC (rev 11397)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t	2009-09-21 14:05:17 UTC (rev 11398)
@@ -276,7 +276,7 @@
                 "visit to chained + subcontroller endpoint for $i" );
             is( $response->header('X-Catalyst-Executed'),
                 $expected, "Executed actions for $i" );
-            is( $response->content, "arg1, arg2; becomescapture",
+            is( $response->content, "becomescapture; arg1, arg2",
                 "Content OK for $i" );
         }
     }




More information about the Catalyst-commits mailing list