summaryrefslogtreecommitdiff
path: root/pp_hot.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 /pp_hot.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 'pp_hot.c')
-rw-r--r--pp_hot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index ca6b1957db..594d114f52 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -362,7 +362,7 @@ PP(pp_eq)
PP(pp_preinc)
{
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_MAX)