X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FContext.pm;h=a04b10493781ee88e099b1f0be5c5e95be985b05;hb=75513d89c0f461d9ac3a678ef6c2321aefdc98cb;hp=3a1146c8772ad0262656c2a8df6276e75076cd75;hpb=a07fc0d907345eabf7e3aa780c7e666f67c898e4;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Context.pm b/lib/Catalyst/Context.pm index 3a1146c..a04b104 100644 --- a/lib/Catalyst/Context.pm +++ b/lib/Catalyst/Context.pm @@ -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 instance by name.