summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-09-27 14:58:49 -0300
committerBrian Fraser <fraserbn@gmail.com>2014-01-04 15:37:47 -0300
commitb24fda9d47697aebc6f3808abd8e5e93dea33a72 (patch)
tree5d00051411a74f9280b132a946260d20789475a6 /dump.c
parentc53e4eb516ca65d8eacd9bd35b1ed2b66755d6c6 (diff)
downloadperl-b24fda9d47697aebc6f3808abd8e5e93dea33a72.tar.gz
dump.c, sv_dump: Escape the name of the OUTSIDE sub
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index 8d42fccebd..964f2fef8a 100644
--- a/dump.c
+++ b/dump.c
@@ -2162,7 +2162,13 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
: CvANON(outside) ? "ANON"
: (outside == PL_main_cv) ? "MAIN"
: CvUNIQUE(outside) ? "UNIQUE"
- : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED"));
+ : CvGV(outside) ?
+ generic_pv_escape(
+ newSVpvs_flags("", SVs_TEMP),
+ GvNAME(CvGV(outside)),
+ GvNAMELEN(CvGV(outside)),
+ GvNAMEUTF8(CvGV(outside)))
+ : "UNDEFINED"));
}
if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv)))
do_sv_dump(level+1, file, MUTABLE_SV(CvOUTSIDE(sv)), nest+1, maxnest, dumpops, pvlim);