diff options
author | Tony Cook <tony@develop-help.com> | 2015-08-17 16:25:11 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-08-17 16:25:11 +1000 |
commit | fb10a8a78bba7573de4629b739bfe81cd42e78c9 (patch) | |
tree | c44e9f14209be1a373d8b1f3a961f7774890c413 /pp_sys.c | |
parent | 6ba07ce12b615587e55caf4477539992d4b3e79b (diff) | |
download | perl-fb10a8a78bba7573de4629b739bfe81cd42e78c9.tar.gz |
[perl #125760] deprecate sys(read|write)(), send(), recv() on :utf8
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1691,6 +1691,11 @@ PP(pp_sysread) fd = PerlIO_fileno(IoIFP(io)); if ((fp_utf8 = PerlIO_isutf8(IoIFP(io))) && !IN_BYTES) { + if (PL_op->op_type == OP_SYSREAD || PL_op->op_type == OP_RECV) { + Perl_ck_warner(aTHX_ packWARN(WARN_DEPRECATED), + "%s() is deprecated on :utf8 handles", + OP_DESC(PL_op)); + } buffer = SvPVutf8_force(bufsv, blen); /* UTF-8 may not have been set if they are all low bytes */ SvUTF8_on(bufsv); @@ -1950,6 +1955,9 @@ PP(pp_syswrite) doing_utf8 = DO_UTF8(bufsv); if (PerlIO_isutf8(IoIFP(io))) { + Perl_ck_warner(aTHX_ packWARN(WARN_DEPRECATED), + "%s() is deprecated on :utf8 handles", + OP_DESC(PL_op)); if (!SvUTF8(bufsv)) { /* We don't modify the original scalar. */ tmpbuf = bytes_to_utf8((const U8*) buffer, &blen); |