a51f94894009cd12833b6100b053976868df6d84
[catagits/Catalyst-Runtime.git] / t / lib / TestAppCustomContainer / Role / HoldsFoo.pm
1 package TestAppCustomContainer::Role::HoldsFoo;
2 use Moose::Role;
3 use namespace::autoclean;
4
5 has foo => (
6     is       => 'ro',
7     isa      => 'TestAppCustomContainer::Model::Foo',
8     required => 1,
9 );
10
11 sub COMPONENT {
12     my ( $self, $ctx, $config ) = @_;
13
14     # FIXME - is this how should I get model Foo?
15     return $self->new(
16         foo => $ctx->model('Foo'),
17     );
18 }
19
20 1;