no need for throwing exception
[catagits/Catalyst-Runtime.git] / t / lib / TestAppCustomContainer / NoSugarContainer.pm
index 79ef2ba..e1439d6 100644 (file)
@@ -8,7 +8,6 @@ extends 'Catalyst::IOC::Container';
 sub BUILD {
     my $self = shift;
 
-    warn("Add SingletonLifeCycle to model");
     $self->get_sub_container('model')->add_service(
         Catalyst::IOC::ConstructorInjection->new(
             name             => 'SingletonLifeCycle',
@@ -17,12 +16,10 @@ sub BUILD {
             catalyst_component_name => 'TestAppCustomContainer::Model::SingletonLifeCycle',
             dependencies     => {
                 application_name => depends_on( '/application_name' ),
-                foo => depends_on('/model/DefaultSetup'),
             },
         )
     );
 
-    warn("Add RequestLifeCycle to model");
     $self->get_sub_container('model')->add_service(
         Catalyst::IOC::ConstructorInjection->new(
             name         => 'RequestLifeCycle',
@@ -31,11 +28,24 @@ sub BUILD {
             catalyst_component_name => 'TestAppCustomContainer::Model::RequestLifeCycle',
             dependencies => {
                 application_name => depends_on( '/application_name' ),
-                foo => depends_on('/model/DefaultSetup'),
             },
         )
     );
 
+#    $self->get_sub_container('model')->add_service(
+#        Catalyst::IOC::ConstructorInjection->new(
+#            name             => 'DependsOnDefaultSetup',
+#            class            => 'TestAppCustomContainer::Model::DependsOnDefaultSetup',
+#            catalyst_component_name => 'TestAppCustomContainer::Model::DependsOnDefaultSetup',
+#            dependencies     => {
+#                application_name => depends_on( '/application_name' ),
+#                # FIXME - this is what is blowing up everything:
+#                # DefaultSetup needs the context. It's not getting it here!
+#                foo => depends_on('/model/DefaultSetup'),
+#            },
+#        )
+#    );
+
 # Broken deps!?!
 #    $self->get_sub_container('model')->add_service(
 #        Catalyst::IOC::BlockInjection->new(