X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FService%2FWithContext.pm;h=6f183004c684ca5ccbc7748d0f2698975090cbf1;hb=4f38bf4bf475178576b5fef4c7b19d122e4a1122;hp=f3e949903ca0d7c65ccb66232b4802faabdea165;hpb=d057ddb9fea20c073a2307d22e530916a88443bc;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Service/WithContext.pm b/lib/Catalyst/Service/WithContext.pm index f3e9499..6f18300 100644 --- a/lib/Catalyst/Service/WithContext.pm +++ b/lib/Catalyst/Service/WithContext.pm @@ -1,9 +1,6 @@ package Catalyst::Service::WithContext; use Moose::Role; -# Why is the needed to be loaded? -use Bread::Board::Types; - with 'Bread::Board::Service'; has accept_context_sub => ( @@ -15,13 +12,13 @@ has accept_context_sub => ( around 'get' => sub { my ( $orig, $self, %params ) = @_; - my $context = delete $params{context}; + my $accept_context_args = delete $params{accept_context_args}; my $instance = $self->$orig(%params); my $ac_sub = $self->accept_context_sub; if ( $instance->can($ac_sub) ) { - return $instance->$ac_sub( @$context ); + return $instance->$ac_sub( @$accept_context_args ); } return $instance;