summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-23 21:19:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-23 21:19:31 +0000
commit64aac5a92f5a6e49b46f320202aef13277e3640b (patch)
treedc769bae26728d6b9d6f8cb8fd32b0f2c89544a1 /op.c
parentef8040b067557994d471dfa4e5ac3900907e94ce (diff)
downloadperl-64aac5a92f5a6e49b46f320202aef13277e3640b.tar.gz
change#4866 was flawed; revert and add better fix for warning
p4raw-link: @4866 on //depot/perl: ef8040b067557994d471dfa4e5ac3900907e94ce p4raw-id: //depot/perl@4867
Diffstat (limited to 'op.c')
-rw-r--r--op.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/op.c b/op.c
index 29f860c8a8..76e6b4db2d 100644
--- a/op.c
+++ b/op.c
@@ -1098,7 +1098,7 @@ Perl_scalarvoid(pTHX_ OP *o)
case OP_GGRGID:
case OP_GETLOGIN:
func_ops:
- if (!(o->op_private & OPpLVAL_INTRO))
+ if (!(o->op_private & (OPpLVAL_INTRO|OPpOUR_INTRO)))
useless = PL_op_desc[o->op_type];
break;
@@ -6292,17 +6292,10 @@ Perl_peep(pTHX_ register OP *o)
case OP_GV:
if (o->op_next->op_type == OP_RV2SV) {
- /* don't execute our($foo) */
- if (o->op_next->op_private & OPpOUR_INTRO) {
+ if (!(o->op_next->op_private & OPpDEREF)) {
null(o->op_next);
- o->op_next = o->op_next->op_next;
- null(o);
- if (oldop && o->op_next)
- oldop->op_next = o->op_next;
- }
- else if (!(o->op_next->op_private & OPpDEREF)) {
- null(o->op_next);
- o->op_private |= o->op_next->op_private & OPpLVAL_INTRO;
+ o->op_private |= o->op_next->op_private & (OPpLVAL_INTRO
+ | OPpOUR_INTRO);
o->op_next = o->op_next->op_next;
o->op_type = OP_GVSV;
o->op_ppaddr = PL_ppaddr[OP_GVSV];