This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix a bug in the debugger tracing variables when one was eval'ing
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 13 Nov 2006 15:05:27 +0000 (15:05 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 13 Nov 2006 15:05:27 +0000 (15:05 +0000)
a string including a "#line" directive containing the actual
name of the file already. (following-up change #25409)
p4raw-link: @25409 on //depot/perl: e66cf94c7069ec9c7bdb94d5438988fe7012771f

p4raw-id: //depot/perl@29263

toke.c

diff --git a/toke.c b/toke.c
index 9e0c08d..d61063a 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -774,12 +774,13 @@ S_incline(pTHX_ char *s)
            gvp = (GV**)hv_fetch(PL_defstash, tmpbuf, tmplen, FALSE);
            if (gvp) {
                gv2 = *(GV**)hv_fetch(PL_defstash, tmpbuf2, tmplen2, TRUE);
-               if (!isGV(gv2))
+               if (!isGV(gv2)) {
                    gv_init(gv2, PL_defstash, tmpbuf2, tmplen2, FALSE);
-               /* adjust ${"::_<newfilename"} to store the new file name */
-               GvSV(gv2) = newSVpvn(tmpbuf2 + 2, tmplen2 - 2);
-               GvHV(gv2) = (HV*)SvREFCNT_inc(GvHV(*gvp));
-               GvAV(gv2) = (AV*)SvREFCNT_inc(GvAV(*gvp));
+                   /* adjust ${"::_<newfilename"} to store the new file name */
+                   GvSV(gv2) = newSVpvn(tmpbuf2 + 2, tmplen2 - 2);
+                   GvHV(gv2) = (HV*)SvREFCNT_inc(GvHV(*gvp));
+                   GvAV(gv2) = (AV*)SvREFCNT_inc(GvAV(*gvp));
+               }
            }
            if (tmpbuf != smallbuf) Safefree(tmpbuf);
            if (tmpbuf2 != smallbuf2) Safefree(tmpbuf2);