diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-02 12:44:19 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-10-02 14:40:21 -0700 |
commit | c997e36218768fb357b1f3d160131f259311e3a3 (patch) | |
tree | 75b702930bf19281553b8ddac1eaea9268cdc054 /pp_ctl.c | |
parent | fda8e777fa2df245de209839b8b21252b2f12c47 (diff) | |
download | perl-c997e36218768fb357b1f3d160131f259311e3a3.tar.gz |
Make list assignment respect foreach aliasing
See ff2a62e0c8 for the explanation. The bug fix in that commit did
not apply to foreach’s aliasing.
In short, ($a,$b)=($c,$d) needs to account for whether two of those
variable names could be referring to the same variable.
This commit causes the test suite to exercise a code path in scope.c
added by ff2a62e0c8, which turned out to be buggy. (I forgot to test
it at the time.)
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2118,6 +2118,7 @@ PP(pp_enteriter) save_pushptrptr(gv, SvREFCNT_inc(*svp), SAVEt_GVSV); *svp = newSV(0); itervar = (void *)gv; + save_aliased_sv(gv); } if (PL_op->op_private & OPpITER_DEF) |