OP *
newGVREF(I32 type, OP *o)
{
- if (type == OP_MAPSTART || type == OP_GREPSTART)
+ if (type == OP_MAPSTART || type == OP_GREPSTART || type == OP_SORT)
return newUNOP(OP_NULL, 0, o);
return ref(newUNOP(OP_RV2GV, OPf_REF, o), type);
}
if (o->op_flags & OPf_STACKED) { /* may have been cleared */
OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */
OP *k;
- kid = kUNOP->op_first; /* get past rv2gv */
+ kid = kUNOP->op_first; /* get past null */
if (kid->op_type == OP_SCOPE || kid->op_type == OP_LEAVE) {
linklist(kid);
peep(k);
kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */
- null(kid); /* wipe out rv2gv */
if (o->op_type == OP_SORT)
kid->op_next = kid;
else
return;
GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV));
GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV));
- kid = kUNOP->op_first; /* get past rv2gv */
+ kid = kUNOP->op_first; /* get past null */
if (kid->op_type != OP_SCOPE)
return;
kid = kLISTOP->op_last; /* get past scope */