diff options
author | Robert Spier <rspier@pobox.com> | 2001-12-19 06:13:38 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-20 14:18:56 +0000 |
commit | 976ea96eb039ee807127647136ce79d22e3b465f (patch) | |
tree | d8938cccf07b3e6ad02135b7486337420f28e3d0 /lib/Carp | |
parent | b7ac61fa5d327fda6245237df40413642e6fdb6b (diff) | |
download | perl-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.pm | 6 |
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) . "'"; } } |