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.t | |
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.t')
-rw-r--r-- | lib/Carp.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Carp.t b/lib/Carp.t index a318c19751..e9dd8cd7f5 100644 --- a/lib/Carp.t +++ b/lib/Carp.t @@ -5,7 +5,7 @@ BEGIN { use Carp qw(carp cluck croak confess); -print "1..7\n"; +print "1..8\n"; print "ok 1\n"; @@ -51,3 +51,8 @@ sub_6; print "ok 7\n"; +# test for caller_info API +my $eval = "use Carp::Heavy; return Carp::caller_info(0);"; +my %info = eval($eval); +print "not " if ($info{sub_name} ne "eval '$eval'"); +print "ok 8\n"; |