diff options
author | Stephen McCamant <smcc@mit.edu> | 1998-07-12 12:17:00 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 22:42:47 +0000 |
commit | 1167e5dafaeb6f2fafbecb2493434aa60f088f4d (patch) | |
tree | 203e5f4c186e964f3a0f41312770077047c4216d /op.c | |
parent | a3f9223b8714edf9abd00efc3fc8a087202f1e98 (diff) | |
download | perl-1167e5dafaeb6f2fafbecb2493434aa60f088f4d.tar.gz |
apply patch for smarter AASSIGN_COMMON detection; regen headers
Message-Id: <13737.12300.950886.821143@alias-2.pr.mcs.net>
Subject: [PATCH] @a=@a=qw(1) not working, both 5.004_04 and 5.004_71
p4raw-id: //depot/perl@1458
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2223,6 +2223,8 @@ pmruntime(OP *o, OP *expr, OP *repl) curop->op_type == OP_PADANY) { repl_has_vars = 1; } + else if (curop->op_type == OP_PUSHRE) + ; /* Okay here, dangerous in newASSIGNOP */ else break; } @@ -2522,6 +2524,14 @@ newASSIGNOP(I32 flags, OP *left, I32 optype, OP *right) if (lastop->op_type != OP_GV) /* funny deref? */ break; } + else if (curop->op_type == OP_PUSHRE) { + if (((PMOP*)curop)->op_pmreplroot) { + GV *gv = (GV*)((PMOP*)curop)->op_pmreplroot; + if (gv == defgv || SvCUR(gv) == generation) + break; + SvCUR(gv) = generation; + } + } else break; } |