X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=39bee16f3b877ed990bde477b6eaed03efc241f5;hp=17c9403bb3c4404339671a07ca064aaa790dd394;hb=df960201c8d8c22edddedced4471c14606877145;hpb=81f25ce60d12146ada6baa3ed8db87a0e8a54408 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 17c9403..39bee16 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -646,7 +646,7 @@ If you want to search for models, pass in a regexp as the argument. sub model { my ( $c, $name, @args ) = @_; - + my $appclass = ref($c) || $c; if( $name ) { my @result = $c->_comp_search_prefixes( $name, qw/Model M/ ); return map { $c->_filter_component( $_, @args ) } @result if ref $name; @@ -659,8 +659,8 @@ sub model { return $c->model( $c->stash->{current_model} ) if $c->stash->{current_model}; } - return $c->model( $c->config->{default_model} ) - if $c->config->{default_model}; + return $c->model( $appclass->config->{default_model} ) + if $appclass->config->{default_model}; my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/Model M/); @@ -700,6 +700,7 @@ 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; @@ -712,8 +713,8 @@ sub view { return $c->view( $c->stash->{current_view} ) if $c->stash->{current_view}; } - return $c->view( $c->config->{default_view} ) - if $c->config->{default_view}; + return $c->view( $appclass->config->{default_view} ) + if $appclass->config->{default_view}; my( $comp, $rest ) = $c->_comp_search_prefixes( undef, qw/View V/); @@ -1566,9 +1567,9 @@ sub execute { sub _stats_start_execute { my ( $c, $code ) = @_; - + my $appclass = ref($c) || $c; return if ( ( $code->name =~ /^_.*/ ) - && ( !$c->config->{show_internal_actions} ) ); + && ( !$appclass->config->{show_internal_actions} ) ); my $action_name = $code->reverse(); $c->counter->{$action_name}++; @@ -1882,7 +1883,7 @@ sub prepare { $c->prepare_read; # Parse the body unless the user wants it on-demand - unless ( $c->config->{parse_on_demand} ) { + unless ( ref($c)->config->{parse_on_demand} ) { $c->prepare_body; } } @@ -2759,7 +2760,7 @@ acme: Leon Brocard Andrew Bramble -Andrew Ford +Andrew Ford EA.Ford@ford-mason.co.ukE Andrew Ruthven @@ -2775,6 +2776,14 @@ chansen: Christian Hansen chicks: Christopher Hicks +Chisel Wright C + +Danijel Milicevic C + +David Kamholz Edkamholz@cpan.orgE + +David Naughton, C + David E. Wheeler dkubb: Dan Kubb @@ -2793,6 +2802,8 @@ gabb: Danijel Milicevic Gary Ashton Jones +Gavin Henry C + Geoff Richards hobbs: Andrew Rodland @@ -2801,7 +2812,7 @@ ilmari: Dagfinn Ilmari Mannsåker jcamacho: Juan Camacho -jester: Jesse Sheidlower +jester: Jesse Sheidlower C jhannah: Jay Hannah @@ -2811,6 +2822,10 @@ Johan Lindstrom jon: Jon Schutz +Jonathan Rockway C<< >> + +Kieren Diment C + konobi: Scott McWhirter marcus: Marcus Ramberg @@ -2841,14 +2856,22 @@ rafl: Florian Ragwitz random: Roland Lammel +Robert Sedlacek C<< >> + sky: Arthur Bergman t0m: Tomas Doran Ulf Edvinsson +Viljo Marrandi C + +Will Hawes C + willert: Sebastian Willert +Yuval Kogman, C + =head1 LICENSE This library is free software. You can redistribute it and/or modify it under