default => 'ACCEPT_CONTEXT',
);
-around 'get' => sub {
- my $orig = shift;
- my $self = shift;
+around get => sub {
+ my $orig = shift;
+ my $self = shift;
+ my %params = @_;
my $instance = $self->$orig(@_);
- my $accept_context_args = $self->param('accept_context_args');
+ my $accept_context_args = $params{accept_context_args};
my $ac_sub = $self->accept_context_sub;
if ( $instance->can($ac_sub) ) {
package Catalyst::IOC::Service::WithParameters;
use Moose::Role;
-with 'Bread::Board::Service',
- 'Bread::Board::Service::WithParameters';
+with 'Bread::Board::Service::WithParameters' => { excludes => '_build_parameters' };
sub _build_parameters {
return {
accept_context_args => {
- isa => 'ArrayRef|Undef',
- required => 0,
- default => undef,
+ isa => 'ArrayRef',
+ required => 1,
}
};
}