X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=7bf9f6acb2a25363ab6ae58685b98bf748478029;hp=809d2a4e08b9758d4c323e268b5ebd9b5343e40e;hb=b94b200c22a5c08f9fa18db789914b3bd593f4b5;hpb=500a16796a666045b3961eef7ceb3a2ed4ec0ca7 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 809d2a4..7bf9f6a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1856,8 +1856,11 @@ sub setup_components { search_path => [ map { s/^(?=::)/$class/; $_; } @paths ], %$config ); + + my @comps = sort { length $a <=> length $b } $locator->plugins; + my %comps = map { $_ => 1 } @comps; - for my $component ( sort { length $a <=> length $b } $locator->plugins ) { + for my $component ( @comps ) { Catalyst::Utils::ensure_class_loaded( $component, { ignore_loaded => 1 } ); my $module = $class->setup_component( $component ); @@ -1865,6 +1868,8 @@ sub setup_components { $component => $module, map { $_ => $class->setup_component( $_ ) + } grep { + not exists $comps{$_} } Devel::InnerPackage::list_packages( $component ) );