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 /sv.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 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -7848,7 +7848,7 @@ Perl_sv_inc_nomg(pTHX_ register SV *const sv) if (!sv) return; if (SvTHINKFIRST(sv)) { - if (SvIsCOW(sv)) + if (SvIsCOW(sv) || isGV_with_GP(sv)) sv_force_normal_flags(sv, 0); if (SvREADONLY(sv)) { if (IN_PERL_RUNTIME) @@ -8029,7 +8029,7 @@ Perl_sv_dec_nomg(pTHX_ register SV *const sv) if (!sv) return; if (SvTHINKFIRST(sv)) { - if (SvIsCOW(sv)) + if (SvIsCOW(sv) || isGV_with_GP(sv)) sv_force_normal_flags(sv, 0); if (SvREADONLY(sv)) { if (IN_PERL_RUNTIME) |