X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=7b21510e4eb9eee5d01f7c2ec78b4d6723ea1d47;hp=fb1efea6000f4c9e7236b2b7716d002527bf910a;hb=418188af18be72b5da445f9ab4514ea668badb29;hpb=2037f03f103f6727b90cc99a8ab1dfe2aebfb558 diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index fb1efea..7b21510 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -320,9 +320,9 @@ sub _invoke_as_component { my ( $self, $c, $component_or_class, $method ) = @_; my $component = $self->_find_component($c, $component_or_class); - my $component_class = blessed $component || return 0; + my $component_class = blessed($component) || $component || return 0; - if (my $code = $component_class->can('action_for')) { + if ( blessed $component and my $code = $component_class->can('action_for') ) { my $possible_action = $component->$code($method); return $possible_action if $possible_action; }