From: Zbigniew Łukasiak Date: Wed, 18 Nov 2009 09:55:12 +0000 (+0000) Subject: calling config on app object instead of class (t/aggregate/live_component_view_single... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a07fc0d907345eabf7e3aa780c7e666f67c898e4 calling config on app object instead of class (t/aggregate/live_component_view_single.t); registered_plugins added to methods proxied in Context --- diff --git a/lib/Catalyst/Context.pm b/lib/Catalyst/Context.pm index 062eebd..3a1146c 100644 --- a/lib/Catalyst/Context.pm +++ b/lib/Catalyst/Context.pm @@ -67,6 +67,7 @@ has 'application' => ( use_stats stats_class set_action + registered_plugins ran_setup _comp_search_prefixes @@ -433,7 +434,6 @@ If you want to search for views, pass in a regexp as the argument. sub view { my ( $c, $name, @args ) = @_; - my $appclass = ref($c) || $c; if( $name ) { my @result = $c->_comp_search_prefixes( $name, qw/View V/ ); return map { $c->_filter_component( $_, @args ) } @result if ref $name; @@ -446,9 +446,8 @@ sub view { return $c->view( $c->stash->{current_view} ) if $c->stash->{current_view}; } - return $c->view( $appclass->config->{default_view} ) - if $appclass->config->{default_view}; - + return $c->view( $c->config->{default_view} ) + if $c->config->{default_view}; my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/View V/); if( $rest ) {