sub BUILD {
my $self = shift;
- warn("Add SingletonLifeCycle to model");
$self->get_sub_container('model')->add_service(
Catalyst::IOC::ConstructorInjection->new(
name => 'SingletonLifeCycle',
class => 'TestAppCustomContainer::Model::SingletonLifeCycle',
catalyst_component_name => 'TestAppCustomContainer::Model::SingletonLifeCycle',
dependencies => {
- application_name => depends_on( '/application_name' ),
- foo => depends_on('/model/DefaultSetup'),
+ application => depends_on( '/application' ),
},
)
);
- warn("Add RequestLifeCycle to model");
$self->get_sub_container('model')->add_service(
Catalyst::IOC::ConstructorInjection->new(
name => 'RequestLifeCycle',
class => 'TestAppCustomContainer::Model::RequestLifeCycle',
catalyst_component_name => 'TestAppCustomContainer::Model::RequestLifeCycle',
dependencies => {
- application_name => depends_on( '/application_name' ),
- foo => depends_on('/model/DefaultSetup'),
+ application => depends_on( '/application' ),
},
)
);
+# $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 => depends_on( '/application' ),
+# # 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(
# lifecycle => 'Singleton',
# class => 'TestAppCustomContainer::External::Class',
# dependencies => [
-# depends_on( '/application_name' ),
+# depends_on( '/application' ),
# ],
# config => $fnar_config,
# )