[Catalyst-commits] r11890 -
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Wed Nov 18 21:32:03 GMT 2009
Author: zby
Date: 2009-11-18 21:32:02 +0000 (Wed, 18 Nov 2009)
New Revision: 11890
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm
Log:
forwarding to "AppTest" without action should go to the "process" method
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-18 21:16:30 UTC (rev 11889)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm 2009-11-18 21:32:02 UTC (rev 11890)
@@ -322,6 +322,19 @@
if( $component_or_class eq blessed($c->application) ){
my $possible_action = $c->application->action_for($method);
return $possible_action if $possible_action;
+ if( my $code = $c->application->can($method) ){
+ return $self->_method_action_class->new(
+ {
+ name => $method,
+ code => $code,
+ reverse => "$component_or_class->$method",
+ class => $component_or_class,
+ namespace => Catalyst::Utils::class2prefix(
+ $component_or_class
+ ),
+ }
+ );
+ }
}
my $component = $self->_find_component($c, $component_or_class);
my $component_class = blessed $component || return 0;
More information about the Catalyst-commits
mailing list