controller method on application, this one is identical to that one in Context -...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Context.pm
index 3a1146c..a04b104 100644 (file)
@@ -35,6 +35,7 @@ has 'application' => (
     handles   => [
         qw/
         controllers 
+        controller
         models 
         views 
         component 
@@ -345,18 +346,6 @@ If you want to search for controllers, pass in a regexp as the argument.
 
 =cut
 
-sub controller {
-    my ( $c, $name, @args ) = @_;
-
-    if( $name ) {
-        my @result = $c->_comp_search_prefixes( $name, qw/Controller C/ );
-        return map { $c->_filter_component( $_, @args ) } @result if ref $name;
-        return $c->_filter_component( $result[ 0 ], @args );
-    }
-
-    return $c->component( $c->action->class );
-}
-
 =head2 $c->model($name)
 
 Gets a L<Catalyst::Model> instance by name.