This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add CXp_FOR_PAD, CXp_FOR_GV flags
[perl5.git] / pp_ctl.c
index 89aaf3a..7b3589d 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2135,6 +2135,7 @@ PP(pp_enteriter)
            SvPADSTALE_on(itersave);
        }
         SvREFCNT_inc_simple_void_NN(itersave);
+       cxtype |= CXp_FOR_PAD;
     }
     else if (LIKELY(isGV(TOPs))) {             /* symbol table variable */
        GV * const gv = MUTABLE_GV(POPs);
@@ -2142,6 +2143,7 @@ PP(pp_enteriter)
        itervarp = (void *)gv;
         itersave = *svp;
        *svp = newSV(0);
+       cxtype |= CXp_FOR_GV;
     }
     else {
        SV * const sv = POPs;