with 'Bread::Board::Service';
-# FIXME - just till I understand how it's supposed to be done
-# Made this so that COMPONENT is executed once,
-# and ACCEPT_CONTEXT every call.
-has instance => (
- is => 'rw',
- required => 0,
-);
-
sub _build_constructor_name { 'COMPONENT' }
around 'get' => sub {
return $component;
}
- if ($self->instance) {
- return $self->instance;
- }
-
my $instance = eval { $self->$orig() };
if ( my $error = $@ ) {
);
}
- $self->instance($instance);
-
return $instance;
};
=head1 NAME
-Catalyst::Service::WithCOMPONENT
+Catalyst::IOC::Service::WithCOMPONENT
=head1 DESCRIPTION