Blast from the past: http://grokbase.com/t/sc/catalyst/077e7jhw9g/rfc-catalyst-plugin-errorout
On Thu, May 9, 2013 at 1:42 PM, Bill Moseley <mose...@hank.org> wrote: > > > On Thu, May 9, 2013 at 9:34 AM, Aristotle Pagaltzis <pagalt...@gmx.de>wrote: > >> * Bill Moseley <mose...@hank.org> [2013-05-09 15:30]: >> > What's the reasoning that chained actions continue to run after an >> > earlier exception? >> >> Seems like an accident of the design to me, borderline bug. >> > > Agreed. Seems like something that could be easily overlooked. > > >> >> If like me you don’t like it, Catalyst::ActionRole::DetachOnDie >> > > Oh, that's nice. Tricks for applying it globally? > > > I went the monkey patch route. Shield your eyes: > > use Catalyst::ActionChain; > sub Catalyst::ActionChain::dispatch { > my ( $self, $c ) = @_; > my @captures = @{$c->req->captures||[]}; > my @chain = @{ $self->chain }; > my $last = pop(@chain); > foreach my $action ( @chain ) { > my @args; > if (my $cap = $action->number_of_captures) { > @args = splice(@captures, 0, $cap); > } > local $c->request->{arguments} = \@args; > $action->dispatch( $c ); > > * return if @{ $c->error }; # Patch* > } > $last->dispatch( $c ); > } > > > > -- > Bill Moseley > mose...@hank.org > _______________________________________________ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ > >
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/