with 'TestAppCustomContainer::Role::HoldsFoo',
'TestAppCustomContainer::Role::ACCEPT_CONTEXT';
+sub BUILD {
+ my ( $self ) = @_;
+
+ $self->foo->inc_bar_got_it;
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
with 'TestAppCustomContainer::Role::HoldsFoo',
'TestAppCustomContainer::Role::ACCEPT_CONTEXT';
+sub BUILD {
+ my ( $self ) = @_;
+
+ $self->foo->inc_baz_got_it;
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
required => 1,
);
-sub COMPONENT {
- my ( $self, $ctx, $config ) = @_;
-
- # FIXME - is this how should I get model Foo?
- return $self->new(
- foo => $ctx->model('Foo'),
- );
-}
-
1;