summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-15 22:27:05 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-15 22:32:33 -0700
commita5f4774196bcd82b1f59014c5973ad9610ca913f (patch)
tree83afd3595d67624f25c9668f52fbeaf65e89e814 /pp_ctl.c
parent1d6bb9ae033c9dd42ee935e1458d658d0cca9183 (diff)
downloadperl-a5f4774196bcd82b1f59014c5973ad9610ca913f.tar.gz
Exclude lex sub package name from (caller $n)[3]
Commit ae77754ae caused it to start including the package name. Pre- viously, lexical subs were reported as ‘(unknown)’. Now we have more expected output: $ ./perl -Ilib -XMfeature=:all -e 'my sub x{warn +(caller 0)[3]} x' x at -e line 1.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 108643e921..4ceca53dc2 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1806,12 +1806,9 @@ PP(pp_caller)
if (!has_arg)
RETURN;
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
- GV * const cvgv = CvGV(dbcx->blk_sub.cv);
/* So is ccstack[dbcxix]. */
- if (cvgv && isGV(cvgv)) {
- SV * const sv = newSV(0);
- gv_efullname3(sv, cvgv, NULL);
- mPUSHs(sv);
+ if (CvHASGV(dbcx->blk_sub.cv)) {
+ PUSHs(cv_name(dbcx->blk_sub.cv, 0));
PUSHs(boolSV(CxHASARGS(cx)));
}
else {