1 package TestAppCustomContainer::NoSugarContainer;
3 use namespace::autoclean;
6 extends 'Catalyst::IOC::Container';
10 $self->get_sub_container('component')->add_service(
11 Catalyst::IOC::ConstructorInjection->new(
13 class => 'TestAppCustomContainer::Model::Baz',
14 lifecycle => 'InstancePerContext',
16 depends_on( '/application_name' ),
17 depends_on( '/config' ),
18 depends_on( '/model/Foo' ),
22 $self->get_sub_container('model')->add_service(
23 Catalyst::IOC::BlockInjection->new(
26 depends_on( '/model/Foo' ),
27 depends_on( '/component/model_Baz' ),
31 my $foo = $s->param('Foo');
32 my $instance = $s->param('model_Baz');
39 __PACKAGE__->meta->make_immutable;