X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=2a40bc56236709d1c7e8febdd2943c2a7d86739f;hp=48f4949f14b834b9a021f1ee446d596b461fdb77;hb=1b526dcc8437ccd8c55e8e313f3fe247b6741969;hpb=efa8265f59bbb8df5f80cc8ee54604acb72554be diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 48f4949..2a40bc5 100755 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -126,7 +126,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90064'; +our $VERSION = '5.90069_001'; sub import { my ( $class, @arguments ) = @_; @@ -1252,9 +1252,10 @@ EOF } $class->setup_finalize; - # Should be the last thing we do so that user things hooking - # setup_finalize can log.. + + # Flush the log for good measure (in case something turned off 'autoflush' early) $class->log->_flush() if $class->log->can('_flush'); + return $class || 1; # Just in case someone named their Application 0... } @@ -2593,18 +2594,15 @@ sub locate_components { my $class = shift; my $config = shift; - my @paths = qw( ::Controller ::C ::Model ::M ::View ::V ); + my @paths = qw( ::M ::Model ::V ::View ::C ::Controller ); my $extra = delete $config->{ search_extra } || []; - push @paths, @$extra; + unshift @paths, @$extra; - my $locator = Module::Pluggable::Object->new( - search_path => [ map { s/^(?=::)/$class/; $_; } @paths ], - %$config - ); - - # XXX think about ditching this sort entirely - my @comps = sort { length $a <=> length $b } $locator->plugins; + my @comps = map { sort { length($a) <=> length($b) } Module::Pluggable::Object->new( + search_path => [ map { s/^(?=::)/$class/; $_; } ($_) ], + %$config + )->plugins } @paths; return @comps; } @@ -3952,6 +3950,8 @@ t0m: Tomas Doran Ulf Edvinsson +vanstyn: Henry Van Styn + Viljo Marrandi C Will Hawes C