From 602097c527f0a109243fdbfd03688082e83b787b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 10 Jul 2013 12:19:29 -0400 Subject: make CollapseStack use Carp::Always (fixes #13) --- lib/Reply/Plugin/CollapseStack.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/Reply/Plugin/CollapseStack.pm b/lib/Reply/Plugin/CollapseStack.pm index 1ccc723..e60c0f5 100644 --- a/lib/Reply/Plugin/CollapseStack.pm +++ b/lib/Reply/Plugin/CollapseStack.pm @@ -5,6 +5,11 @@ use warnings; use base 'Reply::Plugin'; +{ + local @SIG{qw(__DIE__ __WARN__)}; + require Carp::Always; +} + =head1 SYNOPSIS ; .replyrc @@ -31,6 +36,22 @@ sub new { return $self; } +sub compile { + my $self = shift; + my ($next, @args) = @_; + + local $SIG{__DIE__} = \&Carp::Always::_die; + $next->(@args); +} + +sub execute { + my $self = shift; + my ($next, @args) = @_; + + local $SIG{__DIE__} = \&Carp::Always::_die; + $next->(@args); +} + sub mangle_error { my $self = shift; my $error = shift; -- cgit v1.2.3