[Catalyst-commits] r11869 - Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst

zby at dev.catalyst.perl.org zby at dev.catalyst.perl.org
Tue Nov 17 16:19:35 GMT 2009


Author: zby
Date: 2009-11-17 16:19:35 +0000 (Tue, 17 Nov 2009)
New Revision: 11869

Modified:
   Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm
Log:
fixed forwarding to application methods (t/aggregate/live_component_controller_action_forward.t)

Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm	2009-11-17 16:11:03 UTC (rev 11868)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm	2009-11-17 16:19:35 UTC (rev 11869)
@@ -319,6 +319,10 @@
 sub _invoke_as_component {
     my ( $self, $c, $component_or_class, $method ) = @_;
 
+    if( $component_or_class eq blessed($c->application) ){ 
+        my $possible_action = $c->application->action_for($method); 
+        return $possible_action if $possible_action; 
+    } 
     my $component = $self->_find_component($c, $component_or_class);
     my $component_class = blessed $component || return 0;
 




More information about the Catalyst-commits mailing list