diff options
Diffstat (limited to 'ext/PerlIO/Via/Via.xs')
-rw-r--r-- | ext/PerlIO/Via/Via.xs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/PerlIO/Via/Via.xs b/ext/PerlIO/Via/Via.xs index d1d4e644f0..af5f5ea00f 100644 --- a/ext/PerlIO/Via/Via.xs +++ b/ext/PerlIO/Via/Via.xs @@ -115,7 +115,8 @@ PerlIOVia_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg) PerlIOVia *s = PerlIOSelf(f,PerlIOVia); if (!arg) { - Perl_warn(aTHX_ "No package specified"); + if (ckWARN(WARN_LAYER)) + Perl_warner(aTHX_ packWARN(WARN_LAYER), "No package specified"); code = -1; } else @@ -145,7 +146,8 @@ PerlIOVia_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg) } else { - Perl_warn(aTHX_ "Cannot find package '%.*s'",(int) pkglen,pkg); + if (ckWARN(WARN_LAYER)) + Perl_warner(aTHX_ packWARN(WARN_LAYER), "Cannot find package '%.*s'",(int) pkglen,pkg); #ifdef ENOSYS errno = ENOSYS; #else |