From: Chip Salzenberg Date: Mon, 3 Feb 1997 04:01:58 +0000 (+1200) Subject: Ignore refs to lexicals when making refs to lexicals X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3841441e5e6bb3f9e314b1a60a20e0690567685f;p=p5sagit%2Fp5-mst-13.2.git Ignore refs to lexicals when making refs to lexicals --- diff --git a/op.c b/op.c index 2d25fb3..9409378 100644 --- a/op.c +++ b/op.c @@ -187,6 +187,7 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) for (off = AvFILL(curname); off > 0; off--) { if ((sv = svp[off]) && sv != &sv_undef && + !SvFAKE(sv) && seq <= SvIVX(sv) && seq > I_32(SvNVX(sv)) && strEQ(SvPVX(sv), name)) @@ -211,7 +212,7 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) av_store(comppad_name, newoff, sv); SvNVX(sv) = (double)curcop->cop_seq; SvIVX(sv) = 999999999; /* A ref, intro immediately */ - SvFLAGS(sv) |= SVf_FAKE; + SvFAKE_on(sv); /* A ref, not a real var */ if (CvANON(compcv) || SvTYPE(compcv) == SVt_PVFM) { /* "It's closures all the way down." */ CvCLONE_on(compcv); @@ -1379,6 +1380,19 @@ OP *op; peep(main_start); main_cv = compcv; compcv = 0; + /* Register with debugger: */ + + if (perldb) { + CV *cv = perl_get_cv("DB::postponed", FALSE); + + if (cv) { + dSP; + PUSHMARK(sp); + XPUSHs((SV*)compiling.cop_filegv); + PUTBACK; + perl_call_sv((SV*)cv, G_DISCARD); + } + } } }