The Go and visit tests don't like this as you get told to go away in a different...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index d5d8375..4ea6ce1 100644 (file)
@@ -319,23 +319,6 @@ 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; 
-        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;