Commit | Line | Data |
---|---|---|
88cea23c | 1 | package TestAppCustomContainer::SugarContainer; |
3ef84846 | 2 | use Moose; |
88cea23c | 3 | use namespace::autoclean; |
4 | use Catalyst::IOC; | |
7cd05fd2 | 5 | use Bread::Board qw/ depends_on /; |
3ef84846 | 6 | extends 'Catalyst::IOC::Container'; |
7 | ||
8 | sub BUILD { | |
9 | my $self = shift; | |
7cd05fd2 | 10 | warn("In build"); |
11 | $Catalyst::IOC::customise_container->($self); | |
12 | } | |
b18a77bd | 13 | |
7cd05fd2 | 14 | container { |
15 | model { | |
71d3df94 | 16 | component( |
17 | 'Bar' => | |
18 | class => 'TestAppCustomContainer::Model::Bar', | |
19 | dependencies => { foo => depends_on('/model/DefaultSetup') }, | |
7cd05fd2 | 20 | ); |
21 | }; | |
22 | }; | |
3ef84846 | 23 | |
88cea23c | 24 | __PACKAGE__->meta->make_immutable; |
25 | ||
3ef84846 | 26 | 1; |