X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=67adf1739173c9d17a28d0742e90d943d2deb0c8;hb=330b91231edbf5b61375bbda1232674ffa2d1760;hp=4ea6ce1eed14b4ad24f6acbb316572bbbd130376;hpb=04f7e630df122ac8975bec933ba9c1d90bed0e2b;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 4ea6ce1..67adf17 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -319,6 +319,10 @@ sub _find_component { 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;