summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Reply/Plugin/CollapseStack.pm21
1 files changed, 21 insertions, 0 deletions
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;