pod
[catagits/Catalyst-Runtime.git] / lib / Catalyst / IOC / Container.pm
index 89169de..93c6110 100644 (file)
@@ -114,7 +114,6 @@ sub BUILD {
         no strict 'refs';
         no warnings 'once';
         my $class = ref $self;
-        warn("In build $class");
         ${ $class . '::customise_container' }->($self)
             if ${ $class . '::customise_container' };
     }
@@ -453,7 +452,6 @@ sub build_locate_components_service {
 
 sub setup_components {
     my $self = shift;
-    warn("Setting up default components");
     my $class = $self->resolve( service => 'application_name' );
     my @comps = @{ $self->resolve( service => 'locate_components' ) };
     my %comps = map { $_ => 1 } @comps;
@@ -467,6 +465,7 @@ sub setup_components {
     );
 
     if ($app_locate_components_addr != $cat_locate_components_addr) {
+        # FIXME - why not just say: @comps = $class->locate_components() ?
         $class->log->warn(qq{You have overridden locate_components. That } .
             qq{no longer works. Please refer to the documentation to achieve } .
             qq{similar results.\n}
@@ -639,6 +638,9 @@ sub get_all_components {
     # FIXME - if we're getting from these containers, we need to either:
     #   - pass 'ctx' and 'accept_context_args' OR
     #   - make these params optional
+    # big problem when setting up the dispatcher - this method is called
+    # as $container->get_all_components('MyApp'). What to do with Request
+    # life cycles?
     foreach my $type (qw/model view controller /) {
         my $container = $self->get_sub_container($type);
 
@@ -734,7 +736,7 @@ Catalyst::Container - IOC for Catalyst components
 
 =head1 METHODS
 
-=head1 Building Containers
+=head1 Methods for Building Containers
 
 =head2 build_component_subcontainer
 
@@ -757,7 +759,7 @@ Same as L<build_model_subcontainer>, but for views.
 
 Same as L<build_model_subcontainer>, but for controllers.
 
-=head1 Building Services
+=head1 Methods for Building Services
 
 =head2 build_application_name_service
 
@@ -917,6 +919,9 @@ is expected to return a list of component (package) names to be set up.
 
 =head2 setup_components
 
+Uses locate_components service to list the components, and adds them to the
+appropriate subcontainers, using add_component().
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm