summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-10 12:19:29 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-10 12:20:00 -0400
commit602097c527f0a109243fdbfd03688082e83b787b (patch)
tree72e7f8be43c0f4219ad9bb47982920c30e7f85e4
parent1021cea56474d503dafe5a4638a7de2702870ca0 (diff)
downloadreply-602097c527f0a109243fdbfd03688082e83b787b.tar.gz
reply-602097c527f0a109243fdbfd03688082e83b787b.zip
make CollapseStack use Carp::Always (fixes #13)
-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;