if (!SvROK(result) || !SvOBJECT(SvRV(result))) {
e->enc = Nullsv;
- Perl_warner(aTHX_ packWARN(WARN_IO), "Cannot find encoding \"%" SVf "\"",
- arg);
+ if (ckWARN_d(WARN_IO))
+ Perl_warner(aTHX_ packWARN(WARN_IO), "Cannot find encoding \"%" SVf "\"",
+ arg);
errno = EINVAL;
code = -1;
}
XPUSHs(result);
PUTBACK;
if (call_method("renew",G_SCALAR|G_EVAL) != 1 || SvTRUE(ERRSV)) {
- Perl_warner(aTHX_ packWARN(WARN_IO), "\"%" SVf "\" does not support renew method",
- arg);
+ if (ckWARN_d(WARN_IO))
+ Perl_warner(aTHX_ packWARN(WARN_IO), "\"%" SVf "\" does not support renew method",
+ arg);
}
else {
SPAGAIN;
XPUSHs(e->enc);
PUTBACK;
if (call_method("needs_lines",G_SCALAR|G_EVAL) != 1 || SvTRUE(ERRSV)) {
- Perl_warner(aTHX_ packWARN(WARN_IO), "\"%" SVf "\" does not support needs_lines",
+ if (ckWARN_d(WARN_IO))
+ Perl_warner(aTHX_ packWARN(WARN_IO), "\"%" SVf "\" does not support needs_lines",
arg);
}
else {