1 package TestAppCustomContainerNoSugar::Container;
4 extends 'Catalyst::IOC::Container';
8 $self->get_sub_container('component')->add_service(
9 Catalyst::IOC::ConstructorInjection->new(
11 class => 'TestAppCustomContainerNoSugar::Model::Baz',
12 lifecycle => 'InstancePerContext',
14 depends_on( '/application_name' ),
15 depends_on( '/config' ),
16 depends_on( '/model/Foo' ),
20 $self->get_sub_container('model')->add_service(
21 Catalyst::IOC::BlockInjection->new(
24 depends_on( '/model/Foo' ),
25 depends_on( '/component/model_Baz' ),
29 my $foo = $s->param('Foo');
30 my $instance = $s->param('model_Baz');