From: Rafael Garcia-Suarez Date: Fri, 15 Jan 2010 16:37:36 +0000 (+0100) Subject: The warnings emitted by PerlIO::encoding should be silenceable. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1bb5f2059539b5573bb73de8c3a235284687220b;p=p5sagit%2Fp5-mst-13.2.git The warnings emitted by PerlIO::encoding should be silenceable. Make them mandatory warnings. --- diff --git a/ext/PerlIO-encoding/encoding.xs b/ext/PerlIO-encoding/encoding.xs index dc69819..2d515b6 100644 --- a/ext/PerlIO-encoding/encoding.xs +++ b/ext/PerlIO-encoding/encoding.xs @@ -108,8 +108,9 @@ PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs * 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; } @@ -120,8 +121,9 @@ PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs * 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; @@ -133,7 +135,8 @@ PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs * 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 {