summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-08-09 15:51:44 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-08-09 21:08:59 +0000
commit14f338dc60207c41838439f6f09615a0c4c9bf39 (patch)
treefea73174b445281e731d75407b0acf5c55163902 /pp_ctl.c
parent384679aa783f7270f4f3edc35b03682e7825671f (diff)
downloadperl-14f338dc60207c41838439f6f09615a0c4c9bf39.tar.gz
add "$lexical not available" warning in C<for my $lex ()>
Message-ID: <20030809135144.GC4997@fdgroup.com> p4raw-id: //depot/perl@20591
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 76f2e5891c..3c2223a3e0 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1731,6 +1731,11 @@ PP(pp_enteriter)
SAVETMPS;
if (PL_op->op_targ) {
+ if (PL_op->op_private & OPpLVAL_INTRO) { /* for my $x (...) */
+ SvPADSTALE_off(PAD_SVl(PL_op->op_targ));
+ SAVESETSVFLAGS(PAD_SVl(PL_op->op_targ),
+ SVs_PADSTALE, SVs_PADSTALE);
+ }
#ifndef USE_ITHREADS
svp = &PAD_SVl(PL_op->op_targ); /* "my" variable */
SAVESPTR(*svp);