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=8f4e192128b3f65d50ebd5182ee76c19ffd56197;hb=df960201c8d8c22edddedced4471c14606877145;hpb=1b29071319cc106434a29b681b1c52f247bc9f19 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8f4e192..39bee16 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -79,7 +79,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.80009'; +our $VERSION = '5.80011'; { my $dev_version = $VERSION =~ /_\d{2}$/; @@ -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; } } @@ -2153,6 +2154,7 @@ sub setup_components { my @comps = sort { length $a <=> length $b } $class->locate_components($config); + my %comps = map { $_ => 1 } @comps; my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps; $class->log->warn(qq{Your application is using the deprecated ::[MVC]:: type naming scheme.\n}. @@ -2175,6 +2177,7 @@ sub setup_components { for my $component (@comps) { $class->components->{ $component } = $class->setup_component($component); for my $component ($class->expand_component_module( $component, $config )) { + next if $comps{$component}; $class->_controller_init_base_classes($component); # Also cover inner packages $class->components->{ $component } = $class->setup_component($component); } @@ -2221,7 +2224,7 @@ is expected to return a list of component (package) names to be set up. sub expand_component_module { my ($class, $module) = @_; - Devel::InnerPackage::list_packages( $module ); + return Devel::InnerPackage::list_packages( $module ); } =head2 $c->setup_component @@ -2757,7 +2760,7 @@ acme: Leon Brocard Andrew Bramble -Andrew Ford +Andrew Ford EA.Ford@ford-mason.co.ukE Andrew Ruthven @@ -2773,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 @@ -2785,10 +2796,14 @@ esskar: Sascha Kiefer fireartist: Carl Franks +frew: Arthur Axel "fREW" Schmidt + gabb: Danijel Milicevic Gary Ashton Jones +Gavin Henry C + Geoff Richards hobbs: Andrew Rodland @@ -2797,7 +2812,7 @@ ilmari: Dagfinn Ilmari Mannsåker jcamacho: Juan Camacho -jester: Jesse Sheidlower +jester: Jesse Sheidlower C jhannah: Jay Hannah @@ -2807,6 +2822,10 @@ Johan Lindstrom jon: Jon Schutz +Jonathan Rockway C<< >> + +Kieren Diment C + konobi: Scott McWhirter marcus: Marcus Ramberg @@ -2837,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