summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-09-16 15:48:46 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-09-16 16:03:34 -0700
commit60092ce4854ea5801a4711d82d0e2c57a7edcaca (patch)
treef2244dcfa6ea94be6469ac9496fcb45a01d65021 /sv.c
parenta3342be368647e67883bc6ba3bea07bb06880b80 (diff)
downloadperl-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index d6d32e7e18..6ab04da001 100644
--- a/sv.c
+++ b/sv.c
@@ -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)