Almost working sugar
[catagits/Catalyst-Runtime.git] / t / lib / TestAppCustomContainer / SugarContainer.pm
1 package TestAppCustomContainer::SugarContainer;
2 use Moose;
3 use namespace::autoclean;
4 use Catalyst::IOC;
5 use Bread::Board qw/ depends_on /;
6 extends 'Catalyst::IOC::Container';
7
8 sub BUILD {
9     my $self = shift;
10     warn("In build");
11     $Catalyst::IOC::customise_container->($self);
12 }
13
14 container {
15     model {
16         component(
17             'Bar' =>
18                 class        => 'TestAppCustomContainer::Model::Bar',
19                 dependencies => { foo => depends_on('/model/DefaultSetup') },
20         );
21     };
22 };
23
24 __PACKAGE__->meta->make_immutable;
25
26 1;