summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Carp/Reply.pm2
-rw-r--r--lib/Reply/Plugin/CarpReply.pm18
2 files changed, 8 insertions, 12 deletions
diff --git a/lib/Carp/Reply.pm b/lib/Carp/Reply.pm
index b791cd4..c8d29c2 100644
--- a/lib/Carp/Reply.pm
+++ b/lib/Carp/Reply.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
# ABSTRACT: get a repl on exceptions in your program
-use Reply 0.13;
+use Reply 0.18;
use Reply::Config;
=head1 SYNOPSIS
diff --git a/lib/Reply/Plugin/CarpReply.pm b/lib/Reply/Plugin/CarpReply.pm
index 7206348..3f9622f 100644
--- a/lib/Reply/Plugin/CarpReply.pm
+++ b/lib/Reply/Plugin/CarpReply.pm
@@ -30,21 +30,11 @@ sub new {
$self->{stacktrace} = Devel::StackTrace::WithLexicals->new(
ignore_class => ['Reply', 'Carp::Reply', __PACKAGE__],
);
- $self->{frame_index} = 0;
+ $self->_frame_index(0);
return $self;
}
-sub compile {
- my $self = shift;
- my ($next, $line, %opts) = @_;
-
- $opts{environment} = $self->_frame->lexicals;
- $opts{package} = $self->_frame->package;
-
- return $next->($line, %opts);
-}
-
sub command_backtrace {
my $self = shift;
print "Backtrace:\n";
@@ -137,6 +127,12 @@ sub _frame_index {
printf "Now at %s:%s (frame $index)\n",
$self->_frame->filename,
$self->_frame->line;
+
+ $self->publish(
+ 'lexical_environment',
+ default => $self->_frame->lexicals
+ );
+ $self->publish('package', $self->_frame->package);
}
}