[Catalyst-commits] r9545 - in Catalyst-Runtime/5.80/branches/add_captures_to_visit: lib/Catalyst t/aggregate t/lib t/lib/TestApp/Controller/Action

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Sat Mar 21 18:11:04 GMT 2009


Author: t0m
Date: 2009-03-21 18:11:04 +0000 (Sat, 21 Mar 2009)
New Revision: 9545

Modified:
   Catalyst-Runtime/5.80/branches/add_captures_to_visit/lib/Catalyst/Dispatcher.pm
   Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/aggregate/live_component_controller_action_go.t
   Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp.pm
   Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp/Controller/Action/Go.pm
Log:
Unfuck last commit, fix go tests, remove unneeded crud from TestApp, add FIXME for more cleanup

Modified: Catalyst-Runtime/5.80/branches/add_captures_to_visit/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/add_captures_to_visit/lib/Catalyst/Dispatcher.pm	2009-03-21 18:04:06 UTC (rev 9544)
+++ Catalyst-Runtime/5.80/branches/add_captures_to_visit/lib/Catalyst/Dispatcher.pm	2009-03-21 18:11:04 UTC (rev 9545)
@@ -318,8 +318,11 @@
 sub _invoke_as_component {
     my ( $self, $c, $component, $method ) = @_;
 
+    #FIXME - Is this resolving needed/should it just return the instance
+    #        directly
     my $class = $self->_find_component_class( $c, $component ) || return 0;
 
+    my $component_instance = $c->component($class);
     if (my $code = $component_instance->can('action_for')) {
         my $possible_action = $component_instance->$code($method);
         return $possible_action if $possible_action;

Modified: Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/aggregate/live_component_controller_action_go.t
===================================================================
--- Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/aggregate/live_component_controller_action_go.t	2009-03-21 18:04:06 UTC (rev 9544)
+++ Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/aggregate/live_component_controller_action_go.t	2009-03-21 18:11:04 UTC (rev 9545)
@@ -242,7 +242,7 @@
         );
         ok( !$response->is_success, 'Response Fails' );
         is( $response->content,
-            q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be a :Action or some sort.),
+            q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be an :Action of some sort.),
             'Error message'
         );
     }

Modified: Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp/Controller/Action/Go.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp/Controller/Action/Go.pm	2009-03-21 18:04:06 UTC (rev 9544)
+++ Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp/Controller/Action/Go.pm	2009-03-21 18:11:04 UTC (rev 9545)
@@ -96,7 +96,7 @@
 
 sub class_go_test_action : Local {
     my ( $self, $c ) = @_;
-    $c->go(qw/TestApp class_go_test_method/);
+    $c->go(qw/TestApp/);
 }
 
 1;

Modified: Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp.pm	2009-03-21 18:04:06 UTC (rev 9544)
+++ Catalyst-Runtime/5.80/branches/add_captures_to_visit/t/lib/TestApp.pm	2009-03-21 18:11:04 UTC (rev 9545)
@@ -73,16 +73,6 @@
     $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
 }
 
-sub class_go_test_method :Private {
-    my ( $self, $c ) = @_;
-    $c->response->headers->header( 'X-Class-Go-Test-Method' => 1 );
-}
-
-sub class_visit_test_method :Private {
-    my ( $self, $c ) = @_;
-    $c->response->headers->header( 'X-Class-Visit-Test-Method' => 1 );
-}
-
 sub loop_test : Local {
     my ( $self, $c ) = @_;
 




More information about the Catalyst-commits mailing list