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;
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];
#define OPpEARLY_CV 32 /* foo() called before sub foo was parsed */
/* OP_?ELEM only */
#define OPpLVAL_DEFER 16 /* Defer creation of array/hash elem */
- /* OP_RV2?V only */
+ /* OP_RV2?V, OP_GVSV only */
#define OPpOUR_INTRO 16 /* Defer creation of array/hash elem */
/* for OP_RV2?V, lower bits carry hints (currently only HINT_STRICT_REFS) */