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',
15 # FIXME - it should simply be Request (or InstancePerRequest, etc)
16 # see Bread/Board/Service.pm line 47
17 lifecycle => '+Catalyst::IOC::LifeCycle::Request',
19 depends_on( '/application_name' ),
20 depends_on( '/config' ),
21 depends_on( '/model/Foo' ),
25 $self->get_sub_container('model')->add_service(
26 Catalyst::IOC::BlockInjection->new(
29 depends_on( '/model/Foo' ),
30 depends_on( '/component/model_Baz' ),
34 my $foo = $s->param('Foo');
35 my $instance = $s->param('model_Baz');
42 __PACKAGE__->meta->make_immutable;