diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2007-09-10 00:02:55 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-09-10 00:02:55 +0000 |
commit | 0d3b281c4af2422da931f33692a278c5f05854cf (patch) | |
tree | c9233ce65e6a6e1f741db19d2bb044b4a42f9e0a /pad.c | |
parent | cc4b8646f4297d1d601d9f445953d91eaef16779 (diff) | |
download | perl-0d3b281c4af2422da931f33692a278c5f05854cf.tar.gz |
when anon subs are cloned, the 'assign once only' flag should be
set for all state vars in the pad.
(Nicholas worked up the same fix - spooky action at a distance!)
p4raw-id: //depot/perl@31835
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1517,6 +1517,9 @@ Perl_cv_clone(pTHX_ CV *proto) else sv = newSV(0); SvPADMY_on(sv); + /* reset the 'assign only once' flag on each state var */ + if (SvPAD_STATE(namesv)) + SvPADSTALE_on(sv); } } else if (IS_PADGV(ppad[ix]) || IS_PADCONST(ppad[ix])) { |