rep_op->op_flags|=(OPf_REF | OPf_MOD);
unop->op_sibling = rep_op->op_sibling;
rep_op->op_sibling = NULL;
- /* unop->op_targ = pad_alloc(OP_BOOLKEYS, SVs_PADTMP); */
+ unop->op_targ = pad_alloc(OP_BOOLKEYS, SVs_PADTMP);
if (rep_op->op_type == OP_PADHV) {
rep_op->op_flags &= ~OPf_WANT_SCALAR;
rep_op->op_flags |= OPf_WANT_LIST;
}
}
}
- if ((lop->op_flags & OPf_WANT) == OPf_WANT_VOID) {
- if (fop->op_type == OP_PADHV || fop->op_type == OP_RV2HV)
+ if ( ( (lop->op_flags & OPf_WANT) == OPf_WANT_VOID
+ || o->op_type == OP_AND )
+ && ( fop->op_type == OP_PADHV
+ || fop->op_type == OP_RV2HV))
cLOGOP->op_first = opt_scalarhv(fop);
- if (sop && (sop->op_type == OP_PADHV || sop->op_type == OP_RV2HV))
+ if ( (lop->op_flags & OPf_WANT) == OPf_WANT_VOID
+ && sop && (sop->op_type == OP_PADHV || sop->op_type == OP_RV2HV))
cLOGOP->op_first->op_sibling = opt_scalarhv(sop);
- }
}
{
dVAR;
dSP;
+ dTARGET;
HV * const hv = (HV*)TOPs;
if (SvTYPE(hv) != SVt_PVHV) RETSETNO;
}
}
- SETs(boolSV(HvUSEDKEYS(hv) != 0));
+ if (HvUSEDKEYS(hv) != 0) RETSETYES;
+ else SETi(0); /* for $ret = %hash && foo() */
RETURN;
}