1 package TestAppCustomContainer::SugarContainer;
3 use namespace::autoclean;
6 extends 'Catalyst::IOC::Container';
11 container $self => as {
12 container model => as {
14 component Bar => ( dependencies => [ depends_on('/model/Foo') ] );
16 lifecycle => '+Catalyst::IOC::LifeCycle::Request',
18 depends_on( '/application_name' ),
19 depends_on( '/config' ),
20 depends_on( '/model/Foo' ),
23 component Quux => ( lifecycle => 'Singleton' );
25 lifecycle => 'Singleton',
26 class => 'My::External::Class',
27 dependencies => [ depends_on('config') ],
28 # ^^ FIXME - gets whole config, not Model::Foo
29 # There should be a 'nice' way to get the 'standard' config
35 __PACKAGE__->meta->make_immutable;