diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-09-16 15:48:46 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-16 16:03:34 -0700 |
commit | 60092ce4854ea5801a4711d82d0e2c57a7edcaca (patch) | |
tree | f2244dcfa6ea94be6469ac9496fcb45a01d65021 /pp.c | |
parent | a3342be368647e67883bc6ba3bea07bb06880b80 (diff) | |
download | perl-60092ce4854ea5801a4711d82d0e2c57a7edcaca.tar.gz |
Make ++ and -- work on glob copies
These ops considered typeglobs read-only, even if they weren’t.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1054,7 +1054,7 @@ PP(pp_undef) PP(pp_predec) { dVAR; dSP; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) + if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) Perl_croak_no_modify(aTHX); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) && SvIVX(TOPs) != IV_MIN) @@ -1071,7 +1071,7 @@ PP(pp_predec) PP(pp_postinc) { dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) + if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) Perl_croak_no_modify(aTHX); if (SvROK(TOPs)) TARG = sv_newmortal(); @@ -1095,7 +1095,7 @@ PP(pp_postinc) PP(pp_postdec) { dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) + if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) Perl_croak_no_modify(aTHX); if (SvROK(TOPs)) TARG = sv_newmortal(); |