X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=0e9ebc29341b8e36bebb77b838b3b0218a8a7636;hb=a8194217f338ccef382b194b4a849fde15892f98;hp=41b54ebe285dc5de68760f902c3ce94b366e436c;hpb=878b821cd4548d9d3f5a6c5aa05fb2f0c29fe3b0;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 41b54eb..0e9ebc2 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -63,7 +63,7 @@ __PACKAGE__->response_class('Catalyst::Response'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.7008'; +our $VERSION = '5.7011'; sub import { my ( $class, @arguments ) = @_; @@ -1872,6 +1872,11 @@ sub setup_components { my %comps = map { $_ => 1 } @comps; for my $component ( @comps ) { + + # We pass ignore_loaded here so that overlay files for (e.g.) + # Model::DBI::Schema sub-classes are loaded - if it's in @comps + # we know M::P::O found a file on disk so this is safe + Catalyst::Utils::ensure_class_loaded( $component, { ignore_loaded => 1 } ); my $module = $class->setup_component( $component ); @@ -2149,7 +2154,10 @@ the plugin name does not begin with C. my ( $proto, $plugin, $instant ) = @_; my $class = ref $proto || $proto; - Catalyst::Utils::ensure_class_loaded( $plugin, { ignore_loaded => 1 } ); + # no ignore_loaded here, the plugin may already have been + # defined in memory and we don't want to error on "no file" if so + + Catalyst::Utils::ensure_class_loaded( $plugin ); $proto->_plugins->{$plugin} = 1; unless ($instant) { @@ -2373,6 +2381,8 @@ Sam Vilain Sascha Kiefer +Sebastian Willert + Tatsuhiko Miyagawa Ulf Edvinsson