X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FIOC%2FContainer.pm;h=880fa96b26011e439e1e142926322c014b18f57e;hb=3552850bf9f1c075b5c296cfc8d9c792956ca81e;hp=30a7a775c20b9c60f37cf5157b2ff0f2228557f6;hpb=cecc24fd77cb371b88b676f5917013bb1b84b14f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/IOC/Container.pm b/lib/Catalyst/IOC/Container.pm index 30a7a77..880fa96 100644 --- a/lib/Catalyst/IOC/Container.pm +++ b/lib/Catalyst/IOC/Container.pm @@ -611,14 +611,19 @@ sub get_all_components { my $self = shift; my %components; - my $container = $self->get_sub_container('component'); - - for my $component ($container->get_service_list) { - my $comp = $container->resolve( - service => $component - ); - my $comp_name = ref $comp || $comp; - $components{$comp_name} = $comp; + foreach my $type (qw/model view controller /) { + my $container = $self->get_sub_container('component'); + + for my $component ($container->get_service_list) { + my $comp = $container->resolve( + service => $component + ); + my $comp_name = ref $comp || $comp; # THIS IS WRONG! :) + # Just as it is called Model::Foo + # does not mean it has to be + # an instance of model::foo + $components{$comp_name} = $comp; + } } return lock_hash %components;