summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-27 20:53:44 -0400
committerJesse Luehrs <doy@tozt.net>2013-06-27 20:54:09 -0400
commit14155824715169efd9bf78b6b94fc9a6409fc254 (patch)
tree34d887b68f99ac0510ec2c579100bfe86067158f
parent3f8389be9cce2b2da8cd2759dd798edf670ca5b9 (diff)
downloadcarp-reply-14155824715169efd9bf78b6b94fc9a6409fc254.tar.gz
carp-reply-14155824715169efd9bf78b6b94fc9a6409fc254.zip
update to work with new reply
-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);
}
}