summaryrefslogtreecommitdiff
path: root/lib/Carp
diff options
context:
space:
mode:
authorRobert Spier <rspier@pobox.com>2001-12-19 06:13:38 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-20 14:18:56 +0000
commit976ea96eb039ee807127647136ce79d22e3b465f (patch)
treed8938cccf07b3e6ad02135b7486337420f28e3d0 /lib/Carp
parentb7ac61fa5d327fda6245237df40413642e6fdb6b (diff)
downloadperl-976ea96eb039ee807127647136ce79d22e3b465f.tar.gz
Carp.pm caller_info returns wrong info for eval
Message-ID: <15393.4370.605214.548582@rls.cx> p4raw-id: //depot/perl@13816
Diffstat (limited to 'lib/Carp')
-rw-r--r--lib/Carp/Heavy.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index 5228b9b3a9..5de39724a9 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -77,14 +77,14 @@ sub get_status {
# the sub/require/eval
sub get_subname {
my $info = shift;
- if (defined($info->{eval})) {
- my $eval = $info->{eval};
+ if (defined($info->{evaltext})) {
+ my $eval = $info->{evaltext};
if ($info->{is_require}) {
return "require $eval";
}
else {
$eval =~ s/([\\\'])/\\$1/g;
- return str_len_trim($eval, $MaxEvalLen);
+ return "eval '" . str_len_trim($eval, $MaxEvalLen) . "'";
}
}