#endif
}
cPMOPo->op_pmreplroot = Nullop;
- ReREFCNT_dec(PM_GETRE(cPMOPo));
- PM_SETRE(cPMOPo, (REGEXP*)NULL);
+ /* we use the "SAFE" version of the PM_ macros here
+ * since sv_clean_all might release some PMOPs
+ * after PL_regex_padav has been cleared
+ * and the clearing of PL_regex_padav needs to
+ * happen before sv_clean_all
+ */
+ ReREFCNT_dec(PM_GETRE_SAFE(cPMOPo));
+ PM_SETRE_SAFE(cPMOPo, (REGEXP*)NULL);
break;
}
if (o->op_flags & OPf_PARENS)
list(o);
else {
- if (ckWARN(WARN_PARENTHESIS) && PL_bufptr > PL_oldbufptr && PL_bufptr[-1] == ',') {
- char *s;
- for (s = PL_bufptr; *s && (isALNUM(*s) || UTF8_IS_CONTINUED(*s) || strchr("@$%, ",*s)); s++) ;
+ if (ckWARN(WARN_PARENTHESIS)
+ && PL_bufptr > PL_oldbufptr && PL_bufptr[-1] == ',')
+ {
+ char *s = PL_bufptr;
+
+ while (*s && (isALNUM(*s) || UTF8_IS_CONTINUED(*s) || strchr("@$%, ", *s)))
+ s++;
+
if (*s == ';' || *s == '=')
Perl_warner(aTHX_ WARN_PARENTHESIS,
"Parentheses missing around \"%s\" list",
OP *imop;
OP *veop;
char *packname = Nullch;
- STRLEN packlen;
+ STRLEN packlen = 0;
SV *packsv;
if (id->op_type != OP_CONST)
newSVOP(OP_METHOD_NAMED, 0, meth)));
}
- if (ckWARN(WARN_MISC) && imop && SvPOK(packsv = ((SVOP*)id)->op_sv)) {
+ if (ckWARN(WARN_MISC) &&
+ imop && (imop != arg) && /* no warning on use 5.0; or explicit () */
+ SvPOK(packsv = ((SVOP*)id)->op_sv))
+ {
/* BEGIN will free the ops, so we need to make a copy */
packlen = SvCUR(packsv);
packname = savepvn(SvPVX(packsv), packlen);