config might have been cleared (not sure if this should happen, though)
[catagits/Catalyst-Runtime.git] / t / lib / TestAppCustomContainer / SugarContainer.pm
index 80c0fff..8c0bab7 100644 (file)
@@ -2,21 +2,17 @@ package TestAppCustomContainer::SugarContainer;
 use Moose;
 use namespace::autoclean;
 use Catalyst::IOC;
-use Bread::Board;
 extends 'Catalyst::IOC::Container';
 
-sub BUILD {
-    my $self = shift;
-
-    warn("Add Bar to model");
-    $self->get_sub_container('model')->add_service(
+container {
+    model {
         component(
             'Bar' =>
                 class        => 'TestAppCustomContainer::Model::Bar',
                 dependencies => { foo => depends_on('/model/DefaultSetup') },
-        )
-    );
-}
+        );
+    };
+};
 
 __PACKAGE__->meta->make_immutable;