1 package Catalyst::IOC::Service::WithAcceptContext;
4 has accept_context_sub => (
7 default => 'ACCEPT_CONTEXT',
14 my $accept_context_args = $self->param('accept_context_args');
15 my $ac_sub = $self->accept_context_sub;
17 my $instance = $self->$orig(@_);
19 if ( $accept_context_args && $instance->can($ac_sub) ) {
21 # how the heck does this warn CODE???????????
22 warn ref $accept_context_args if ref $accept_context_args ne 'ARRAY';
23 return $instance->$ac_sub( @$accept_context_args );
38 Catalyst::IOC::Service::WithAcceptContext
44 =head2 accept_context_sub
48 Catalyst Contributors, see Catalyst.pm
52 This library is free software. You can redistribute it and/or modify it under
53 the same terms as Perl itself.