In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7ca0bfc44db17fe750a1805eba35203e7711bac0?hp=f3f4813bbd7d765bb44dcfe9adef80b34a59c8e1>
- Log ----------------------------------------------------------------- commit 7ca0bfc44db17fe750a1805eba35203e7711bac0 Author: Abigail <[email protected]> Date: Mon Jan 16 19:10:04 2017 +0100 Mention changed deprecation messages in perldelta. M pod/perldelta.pod commit dc6e8de0c8eef348cabc76d23a98ce74e4b90cde Author: Abigail <[email protected]> Date: Mon Jan 16 11:44:30 2017 +0100 There's an objection to fatalizing jumping into a construct. This reverts commit 84b32f52b10f9912b40ef378cd0b01f4aff80630. This reverts commit d30393aaade31b605724846a30a10dd1e96cd181. We need more debate on this one; either we should undeprecate it, or settle on an end-of-life version. M handy.h M pod/perldeprecation.pod M pod/perldiag.pod M pod/perlfunc.pod M pp_ctl.c commit 37398dc1a6d62d8d18b2db9ec44bca65d4091614 Author: Abigail <[email protected]> Date: Sun Jan 15 22:23:47 2017 +0100 Use of $* and $# will be fatal in 5.30. Initially, the plan was to just drop the deprecation message of $* and $#, letting them be the magicless punctuation variables they are now. However, we decided to make their use fatal, so we can use them in a future version of Perl. M gv.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/2use M t/lib/warnings/gv commit a678626e6d2dd11740073117f5269f7efee639de Author: Abigail <[email protected]> Date: Sun Jan 15 13:23:34 2017 +0100 Revert "Remove deprecation warnings related to $* and $#." This reverts commit e9b5346b919b4f4cc0096af4644cb0d48d64e14c. We've decided that instead of leaving $* and $# as usuable, magic-free variables, we instead make it fatal to use them. Therefore, we restore the warnings their use gives, and in a subsequent commit, we fix the warning to indicate the version where their use becomes fatal. M gv.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/2use M t/lib/warnings/gv commit 753c381f465ebe5b971baaf5f00099811c27b2fd Author: Abigail <[email protected]> Date: Sun Jan 15 13:23:12 2017 +0100 Revert "Fix mentioning of C<$#>." This reverts commit b9a643355baa0bd9bc9b4e9cbaf51c8727589bfa. M pod/perldeprecation.pod commit 1d0618439b9389dfa5078e4b92b2c20b6c16be44 Author: Abigail <[email protected]> Date: Sat Jan 14 22:34:30 2017 +0100 Mention $! vs $^E in pod/perlport.pod Since 5.24, it has been deprecated to check $! after a Winsock function; one such use $^E instead. However, since we do not have a deprecation warning for this, we cannot set an EOL version of this deprecation. As such, it just gets mentioned in perlport, and this will be the only deprecation without an EOL version. M pod/perlport.pod commit de69c9afbd97c373d12d2b0aa96318fdcb5b4f74 Author: Abigail <[email protected]> Date: Sat Jan 14 22:28:50 2017 +0100 Update an old email address of mine M pod/perlport.pod commit ecbcbef0f9456cff348b48ea07ccfef844c4a5eb Author: Abigail <[email protected]> Date: Sat Jan 14 22:13:54 2017 +0100 String bitwise operators will not accept code points > 0xFF in 5.28 M op.h M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/doop M t/lib/warnings/pp commit 1972ac5c2455a780ab04acb68be3dcde091c19ce Author: Abigail <[email protected]> Date: Sat Jan 14 21:44:56 2017 +0100 Reading/writing bytes from :utf8 handles will be fatal in 5.30 M pod/perldeprecation.pod M pod/perldiag.pod M pp_sys.c M t/lib/warnings/pp_sys commit 9840d1d66ee1648f6d7fb1554101450158cfee16 Author: Abigail <[email protected]> Date: Sat Jan 14 18:25:48 2017 +0100 Deprecating the modifyable variables in constants by 5.32. It was already deprecated, but we're now adding a version number. M pad.c M pod/perldeprecation.pod M pod/perldiag.pod M t/op/const-optree.t commit 24ca458667a908883f2aad18ea28ad1a5637534e Author: Abigail <[email protected]> Date: Sat Jan 14 04:01:39 2017 +0100 Make it fatal to pass malformed UTF-8. Due to a bug in either Perl, or in some XS-code, it's possible for a string which is supposed to be in UTF-8 format to not be properly encoded. If you try to find out its type (digit, punctuation) perl will now croak. This behaviour was deprecated in Perl 5.18. M pod/perldeprecation.pod M pod/perldiag.pod commit c437f7ac8463f610ccc01a2df0ad2287742d3edd Author: Abigail <[email protected]> Date: Sat Jan 14 02:30:49 2017 +0100 my() in a false conditional will be fatal in Perl 5.30 M op.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/op commit 30b17cc1e1a4683734a35a2fc7416f1ef34f4e5d Author: Abigail <[email protected]> Date: Fri Jan 13 22:36:47 2017 +0100 Deprecation of an unqualified dump() to mean CORE::dump(). This will no longer be allowed in 5.30. M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/croak/pp_ctl M t/lib/warnings/toke M t/op/dump.t M toke.c commit bfdc8cd3d5a81ab176f7d530d2e692897463c97d Author: Abigail <[email protected]> Date: Fri Jan 13 20:29:58 2017 +0100 Deprecating the use of C<< \cI<X> >> to specify a printable character. Starting in 5.14, we deprecated the use of "\cI<X>" when this results in a printable character. For instance, "\c:" is just a fancy way of writing "z". Starting in 5.28, this will be a fatal error. This also includes certain usage in regular expressions with the experimental (?[ ]) construct, or when "use re 'strict'" is in effect (also experimental). M dquote.c M pod/perldeprecation.pod M pod/perldiag.pod M regcomp.c M t/lib/warnings/regcomp M t/lib/warnings/toke M t/re/reg_mesg.t commit 838ba4df5dc7a6ea548005412fcf40feb86d2078 Author: Abigail <[email protected]> Date: Thu Nov 24 15:35:43 2016 +0100 B::OP::terse will go away in Perl 5.28. Adjusted the deprecation message, and bumped the version of B::Terse. M ext/B/B/Terse.pm M pod/perldeprecation.pod commit 4a29ab5ede4282c69f475fe7125e219533fba149 Author: Abigail <[email protected]> Date: Thu Nov 24 13:57:23 2016 +0100 No longer mention some uses of $SIG {__DIE__} are deprecated. The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was never intended to happen this way, but an implementation glitch made this possible. This used to be deprecated, as it allowed strange action at a distance like rewriting a pending exception in C<$@>. Plans to rectify this have been scrapped, as users found that rewriting a pending exception is actually a useful feature, and not a bug. M pod/perldeprecation.pod M pod/perlvar.pod commit 2560602ccfb78a9b4743012af45eeb2e7b74e47e Author: Abigail <[email protected]> Date: Thu Nov 24 13:22:10 2016 +0100 Remove utils/c2ph and utils/pstruct These programs are the same, just behave differently depending on under which name you call it. This is a very old script, originally dating from the perl3 era. It has been deprecated in favour of h2xs for a long time. In Perl 5.26, these utilities will no longer be available. M Cross/Makefile-cross-SH M INSTALL M MANIFEST M Makefile.SH M NetWare/Makefile M configure.com M pod/perl.pod M pod/perldeprecation.pod M pod/perlutil.pod M t/porting/known_pod_issues.dat M utils.lst M utils/Makefile.PL D utils/c2ph.PL M vms/descrip_mms.template M win32/GNUmakefile M win32/Makefile M win32/makefile.mk commit 856f8944b1d313e9baaa81430ebd961e986904d3 Author: Abigail <[email protected]> Date: Thu Nov 24 12:40:04 2016 +0100 Don't recognize the --libpods option in Pod::Html Since Perl 5.18, the --libpods option has been recognized, but did not do anything other than issue a deprecation warnings. As of now, using the --libpods option creates an error. The version number of Pod::Html has bumped to 1.2202. M ext/Pod-Html/lib/Pod/Html.pm M pod/perldeprecation.pod commit 90cf205a54e4048c3ee8d3d19911b435ccff3b17 Author: Abigail <[email protected]> Date: Thu Nov 24 01:11:01 2016 +0100 Remove unneeded entry from pod/perldiag.pod It had an entry 'Use of %s is deprecated', matching the warnings the deprecation() macro in handy.h could generate. Most of these warning had already their own entries in perldiag.pod, and the ones which did not, now do. Furthermore, the format of the warnings has changed, as we now have a version in which the construct disappears from Perl in the message. M pod/perldiag.pod commit d9d53e86c76a4a8cffdc6b39af3f2532373da52a Author: Abigail <[email protected]> Date: Thu Nov 24 00:50:09 2016 +0100 Use of inherited AUTOLOAD for non-methods will be fatal in 5.28. Which will be 21 years after it was deprecated (5.004). M gv.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/gv M t/porting/diag.t commit 7dd446ab5d25c3473fb6fef123339c48bbf1ad90 Author: Abigail <[email protected]> Date: Wed Nov 23 23:03:13 2016 +0100 Remove the deprecate() macro from handy.h. Since we now require each deprecation message to come with a version in which the feature will disappear, and we have reworked the existing uses of this macro, there doesn't seem to be a need for this one anymore. M handy.h commit 9fc8eee0cf5a8b99e1ae152c10fed4cfe9e4f682 Author: Abigail <[email protected]> Date: Wed Nov 23 22:52:36 2016 +0100 Jumping into constructs will be fatal in 5.28. M pod/perldeprecation.pod M pod/perldiag.pod M pod/perlfunc.pod M pp_ctl.c commit 6ef4f8b7ef62d23d0b240c6f964676e87ae049c2 Author: Abigail <[email protected]> Date: Wed Nov 23 19:38:15 2016 +0100 Use of comma-less variable lists is deprecated. It will be fatal by Perl 5.28. M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/toke M toke.c commit fcdb3ac1ccb7b4c3c28d45058dc5ab83d9299dbb Author: Abigail <[email protected]> Date: Wed Nov 23 19:06:51 2016 +0100 Use of Unicode code points exceeding IV_MAX will be fatal in Perl 5.28 Changed the warning to reflect the deadline of this deprecation. Update tests, perldiag.pod and added a section to perldeprecation.pod. M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/pp M t/lib/warnings/utf8 M utf8.c commit 286c945634914f71fe8a350f9f4a89879581194e Author: Abigail <[email protected]> Date: Mon Nov 21 22:38:32 2016 +0100 Unescaped left braces in regular expressions will be fatal in 5.30. In 5.26, some uses of unescaped left braces were made fatal; they have given a deprecation warning since 5.20. Due to an oversight, some cases were missed, and did not give a deprecation warning. They do now. This patch changes said deprecation warning to mention the Perl version in which the use of an unescaped left brace will be fatal (5.30). The patch also cleans up some unnecessary quotes inside a C<> construct in the discussion of this warning in perldiag.pod. M pod/perldeprecation.pod M pod/perldiag.pod M regcomp.c M t/re/reg_mesg.t commit e5aa3f0ba3df86da81ce4bd8843afb6e86c02ffe Author: Abigail <[email protected]> Date: Fri Nov 18 18:33:19 2016 +0100 Bare heredocs will be fatal in 5.28. Heredocs without a terminator after the << have been deprecated since 5.000. After more than 2 decades, it's time to retire this construct. They will be fatal in 5.28. M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/toke M t/op/heredoc.t M toke.c commit db99d38d7bed1dda8c2626c9996232e704cc25c5 Author: Abigail <[email protected]> Date: Fri Nov 18 17:41:44 2016 +0100 Use of \N{} will be fatal in 5.28. Use of \N{} in a double quoted context, with nothing between the braces, was deprecated in 5.24, and it will be a fatal error in 5.28. M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/regcomp M toke.c commit d239bea029ac5b8794208dd45d76d3af2d7c8bbe Author: Abigail <[email protected]> Date: Fri Nov 18 14:56:56 2016 +0100 Reformat overlong comment. pod/perlhack.pod says to try hard not to exceed 79 columns. M mg.c commit d8940893299cd62dcdb1164f85c67ac6279f10b5 Author: Abigail <[email protected]> Date: Fri Nov 18 14:52:18 2016 +0100 $/ = \-1 will be fatal in Perl 5.28. Setting $/ to a reference of a non-positive integer has been deprecated since 5.20, in which it was special cased to act like you had set to $/ to undef. In Perl 5.28, setting $/ to a reference to a non-positive integer will be a fatal error. M mg.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/9uninit M t/lib/warnings/mg commit 122d6c09702a0437a06efd713ba57d17175289bb Author: Abigail <[email protected]> Date: Thu Nov 17 19:34:37 2016 +0100 Opening a file and dir using the same symbol will be fatal in 5.28. Perl 5.10 deprecated using the same symbol to open both a filehandle and a dirhandle, as this can lead to confusing code. In Pelr 5.28, this will become a fatal error. This patch changes the warning to reflect this. M pod/perldeprecation.pod M pod/perldiag.pod M pp_sys.c M t/lib/warnings/pp_sys commit cb4e545c78f80e83e0fa1b400cdbc87d14149adf Author: Abigail <[email protected]> Date: Thu Nov 17 00:38:38 2016 +0100 Fix mentioning of C<$#>. A copy and past left a C<$*> instead of a C<$#>. Pointed out by douglas steinwand. M pod/perldeprecation.pod commit ac6414262a1b4f261b44de47567879421546f605 Author: Abigail <[email protected]> Date: Wed Nov 16 19:07:32 2016 +0100 Setting ${^ENCODE} will be fatal by 5.28. Hence, we adapted the warning, to mention the version in which it will become a fatal error. M handy.h M mg.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/gv M t/lib/warnings/mg commit d1be68f6c29afe9530d0f04f52b6535313dc1ed2 Author: Abigail <[email protected]> Date: Wed Nov 16 00:20:31 2016 +0100 Be consistent when addressing Perl. In perldeprecation.pod, when referring to a particular perl version, use "Perl 5.XX" (or "Perl 5.00X" for pre-5.6 versions) consistently. M pod/perldeprecation.pod commit 52b37024902e2235753cc53604567cfd4be0b15a Author: Abigail <[email protected]> Date: Tue Nov 15 23:51:53 2016 +0100 Remove deprecation warnings related to $* and $#. The magic variables $* and $# were deprecated in 5.000. Their magical meaning was removed in Perl 5.10. Since then, a warning was issued if the variables were used. This warnings has been removed. M gv.c M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/2use M t/lib/warnings/gv commit c96809061c2def2e6554bf2f122c294e7396fb98 Author: Abigail <[email protected]> Date: Tue Nov 15 19:35:28 2016 +0100 Time limit the deprecation of :unique and :locked. The :unique and :locked attributes have had no effect since 5.8.8 and 5.005 respectively. They were deprecated in 5.12. They are now scheduled to be deleted in 5.28. There are two places the deprecation warning can be issued: in lib/attributes.pm, and in toke.c. The warnings were phrased differently, but since we're changing the warning anyway (as we added the version of Perl in which the attributes will disappear), we've used the same phrasing for this warning, regardless of where it is generated: Attribute "locked" is deprecated, and will disappear in Perl 5.28 Attribute "unique" is deprecated, and will disappear in Perl 5.28 M ext/attributes/attributes.pm M handy.h M pod/perldeprecation.pod M pod/perldiag.pod M t/lib/warnings/toke M t/op/attrs.t M toke.c commit 3da1a3d5452e2d6211aabdc62e63979bec5e373d Author: Abigail <[email protected]> Date: Mon Nov 14 19:13:29 2016 +0100 Drop .0 from version numbers. Since most perl versions we will refer to in this document will be major releases, we'll drop the trailing ".0" whenever we mention a version. M pod/perldeprecation.pod commit a0e213fcb5aa6690f639123c7aedb590e790907b Author: Abigail <[email protected]> Date: Mon Nov 14 19:08:12 2016 +0100 Actively deprecate File::Glob::glob(). This function has been deprecated since 5.8. However, no deprecation message was issued; only perl5.008delta.pod and a comment in the file mention its deprecation. This patch issues a deprecation message, and warns the user it will be gone in perl 5.30. Since all this method does is calling File::Glob::bsd_glob anyway, code calling this is easily fixed. M ext/File-Glob/Glob.pm M pod/perldeprecation.pod M pod/perldiag.pod commit c4d8d6a210eeb43ce8a86793561fb5c56d47f482 Author: Abigail <[email protected]> Date: Mon Nov 14 17:26:42 2016 +0100 Move discussion of using tie and friends on * less scalars which hold globs This was deprecated in 5.14, and fixed in 5.16. Hence, it's moved out of pod/perldiag.pod, and added to pod/perldeprecation.pod. M pod/perldeprecation.pod M pod/perldiag.pod commit 892fc9e0623e70ccee84620a1ce94aa95c731ab5 Author: Abigail <[email protected]> Date: Mon Nov 14 16:16:49 2016 +0100 Removed entry "Setting ${^ENCODING} is deprecated" pod/perldiag.pod mentions twice that the use of ${^ENCODING} is deprecated. This is overkill, and we've removed the entry which uses wording which is no longer used. M pod/perldiag.pod commit 46d7f3c1be21894b6f09677792bb1b6e954f8243 Author: Abigail <[email protected]> Date: Mon Nov 14 16:12:12 2016 +0100 Deprecated POSIX functions were removed in 5.24.0 Therefore, we no longer need the entry in pod/perldiag.pod. We do however need an entry in pod/perldeprecation.pod. M pod/perldeprecation.pod M pod/perldiag.pod commit 9021a1cfe5d8afb5e72f6dd69c5356b69b62d580 Author: Abigail <[email protected]> Date: Mon Nov 14 14:35:00 2016 +0100 Created pod/perldeprecation.pod This pod is intended to document all deprecations in Perl. It will document when something became deprecated, when it is scheduled to be actually removed, and it will offer alternatives. Initially, we documented the undeprecation of *glob{FILEHANDLE}, and removed its entry from pod/perldiag.pod where it was left after it being no longer deprecated. M MANIFEST M pod/perl.pod A pod/perldeprecation.pod M pod/perldiag.pod M win32/pod.mak ----------------------------------------------------------------------- Summary of changes: Cross/Makefile-cross-SH | 4 +- INSTALL | 2 - MANIFEST | 2 +- Makefile.SH | 4 +- NetWare/Makefile | 3 +- configure.com | 2 - dquote.c | 8 +- ext/B/B/Terse.pm | 4 +- ext/File-Glob/Glob.pm | 8 +- ext/Pod-Html/lib/Pod/Html.pm | 6 +- ext/attributes/attributes.pm | 11 +- gv.c | 13 +- handy.h | 6 + mg.c | 18 +- op.c | 3 +- op.h | 3 +- pad.c | 3 +- pod/perl.pod | 3 +- pod/perldelta.pod | 99 ++- pod/perldeprecation.pod | 427 ++++++++++++ pod/perldiag.pod | 200 +++--- pod/perlport.pod | 25 +- pod/perlutil.pod | 9 +- pod/perlvar.pod | 13 +- pp_sys.c | 10 +- regcomp.c | 23 +- t/lib/croak/pp_ctl | 3 +- t/lib/warnings/2use | 8 +- t/lib/warnings/9uninit | 2 +- t/lib/warnings/doop | 18 +- t/lib/warnings/gv | 34 +- t/lib/warnings/mg | 12 +- t/lib/warnings/op | 14 +- t/lib/warnings/pp | 6 +- t/lib/warnings/pp_sys | 20 +- t/lib/warnings/regcomp | 18 +- t/lib/warnings/toke | 47 +- t/lib/warnings/utf8 | 18 +- t/op/attrs.t | 3 +- t/op/const-optree.t | 3 +- t/op/dump.t | 7 + t/op/heredoc.t | 2 +- t/porting/diag.t | 2 +- t/porting/known_pod_issues.dat | 1 - t/re/reg_mesg.t | 22 +- toke.c | 19 +- utf8.c | 2 +- utils.lst | 1 - utils/Makefile.PL | 10 +- utils/c2ph.PL | 1448 ---------------------------------------- vms/descrip_mms.template | 5 +- win32/GNUmakefile | 4 +- win32/Makefile | 4 +- win32/makefile.mk | 4 +- win32/pod.mak | 4 + 55 files changed, 908 insertions(+), 1742 deletions(-) create mode 100644 pod/perldeprecation.pod delete mode 100644 utils/c2ph.PL diff --git a/Cross/Makefile-cross-SH b/Cross/Makefile-cross-SH index 31e4aaf9ec..90f9f6f72b 100644 --- a/Cross/Makefile-cross-SH +++ b/Cross/Makefile-cross-SH @@ -327,7 +327,7 @@ private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod lib/buildcustomize.pl shextract = Makefile cflags config.h makedepend \ makedir myconfig writemain pod/Makefile -addedbyconf = UU $(shextract) lib/lib.pm pstruct +addedbyconf = UU $(shextract) lib/lib.pm # Unicode data files generated by mktables unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \ @@ -997,7 +997,7 @@ _cleaner2: rm -rf $(unidatafiles) $(unidatadirs) rm -rf lib/auto rm -f lib/.exists lib/*/.exists lib/*/*/.exists - rm -f h2ph.man pstruct + rm -f h2ph.man rm -rf .config rm -f preload rm -rf lib/Encode lib/Compress lib/Hash lib/re diff --git a/INSTALL b/INSTALL index c668af00cc..8fcc58f865 100644 --- a/INSTALL +++ b/INSTALL @@ -2239,8 +2239,6 @@ make install will install the following: cppstdin This is used by the deprecated switch perl -P, if your cc -E can't read from stdin. - c2ph, pstruct Scripts for handling C structures in header - files. corelist Shows versions of modules that come with different versions of perl. diff --git a/MANIFEST b/MANIFEST index 017b73b92a..4875774fb9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4942,6 +4942,7 @@ pod/perldebguts.pod Perl debugging guts and tips pod/perldebtut.pod Perl debugging tutorial pod/perldebug.pod Perl debugging pod/perldelta.pod Perl changes since previous version +pod/perldeprecation.pod Perl deprecations pod/perldiag.pod Perl diagnostic messages pod/perldsc.pod Perl data structures intro pod/perldtrace.pod Perl's support for DTrace @@ -5890,7 +5891,6 @@ utfebcdic.h Unicode on EBCDIC (UTF-EBCDIC, tr16) header util.c Utility routines util.h Dummy header utils.lst Lists utilities bundled with Perl -utils/c2ph.PL program to translate dbx stabs to perl utils/corelist.PL Module::CoreList utils/cpan.PL easily interact with CPAN from the command line utils/enc2xs.PL Encode module generator diff --git a/Makefile.SH b/Makefile.SH index 1b81e20adc..2cb0010f78 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -481,7 +481,7 @@ shextract = $shextract ## In the following dollars and backticks do not need the extra backslash. $spitshell >>$Makefile <<'!NO!SUBS!' -addedbyconf = UU $(shextract) pstruct +addedbyconf = UU $(shextract) # Unicode data files generated by mktables unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \ @@ -1398,7 +1398,7 @@ _cleaner2: rm -rf $(unidatafiles) $(unidatadirs) rm -rf lib/auto rm -f lib/.exists lib/*/.exists lib/*/*/.exists - rm -f h2ph.man pstruct + rm -f h2ph.man rm -rf .config rm -f preload rm -f pod2htmd.tmp diff --git a/NetWare/Makefile b/NetWare/Makefile index 6a284dcdbb..948bc942c2 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -661,7 +661,6 @@ UTILS = \ ..\utils\splain \ ..\utils\perlbug \ ..\utils\pl2pm \ - ..\utils\c2ph \ ..\utils\h2xs \ ..\utils\perldoc \ ..\pod\pod2html \ @@ -1349,7 +1348,7 @@ distclean: clean nwclean -del /f /q $(PODDIR)\*.html -del /f /q $(PODDIR)\*.bat cd ..\utils - -del /f /q h2ph splain perlbug pl2pm c2ph h2xs perldoc + -del /f /q h2ph splain perlbug pl2pm h2xs perldoc -del /f /q *.bat cd ..\netware -del /f /q ..\config.sh ..\splittree.pl dlutils.c config.h.new diff --git a/configure.com b/configure.com index 2e5b8106ed..2cc41e167f 100644 --- a/configure.com +++ b/configure.com @@ -7407,7 +7407,6 @@ $ ENDIF $ WRITE CONFIG "$!" $ WRITE CONFIG "$! Symbols for Perl-based utility programs:" $ WRITE CONFIG "$!" -$ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com""" $ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com""" $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com""" $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com""" @@ -7430,7 +7429,6 @@ $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]p $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com""" $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com""" $ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com""" -$ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com""" $ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com""" $ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com""" $ WRITE CONFIG "$ ptargrep == """ + perl_setup_perl + " ''vms_prefix':[utils]ptargrep.com""" diff --git a/dquote.c b/dquote.c index e02308e7ac..ef030468c0 100644 --- a/dquote.c +++ b/dquote.c @@ -46,10 +46,10 @@ Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning) clearer[i++] = result; clearer[i++] = '\0'; - Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX), - "\"\\c%c\" is more clearly written simply as \"%s\"", - source, - clearer); + Perl_ck_warner_d(aTHX_ packWARN2(WARN_SYNTAX,WARN_DEPRECATED), + "\"\\c%c\" is more clearly written simply as \"%s\". " + "This will be a fatal error in Perl 5.28", + source, clearer); } return result; diff --git a/ext/B/B/Terse.pm b/ext/B/B/Terse.pm index 8e551c5a62..1749f326a1 100644 --- a/ext/B/B/Terse.pm +++ b/ext/B/B/Terse.pm @@ -1,6 +1,6 @@ package B::Terse; -our $VERSION = '1.06'; +our $VERSION = '1.07'; use strict; use B qw(class @specialsv_name); @@ -33,7 +33,7 @@ sub indent { # Don't use this, at least on OPs in subroutines: it has no way of # getting to the pad, and will give wrong answers or crash. sub B::OP::terse { - carp "B::OP::terse is deprecated; use B::Concise instead"; + carp "B::OP::terse is deprecated and will go away in Perl 5.28; use B::Concise instead"; B::Concise::b_terse(@_); } diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm index c9c2d29f8e..c619749fa0 100644 --- a/ext/File-Glob/Glob.pm +++ b/ext/File-Glob/Glob.pm @@ -37,7 +37,7 @@ pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob" @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob'); -$VERSION = '1.27'; +$VERSION = '1.28'; sub import { require Exporter; @@ -75,6 +75,12 @@ if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) { # File::Glob::glob() is deprecated because its prototype is different from # CORE::glob() (use bsd_glob() instead) sub glob { + use 5.024; + use warnings (); + warnings::warnif (deprecated => + "File::Glob::glob() will disappear in perl 5.30. " . + "Use File::Glob::bsd_glob() instead.") unless state $warned ++; + splice @_, 1; # no flags goto &bsd_glob; } diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm index cef329e1ef..5b3463687b 100644 --- a/ext/Pod-Html/lib/Pod/Html.pm +++ b/ext/Pod-Html/lib/Pod/Html.pm @@ -3,7 +3,7 @@ use strict; require Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = 1.2201; +$VERSION = 1.2202; @ISA = qw(Exporter); @EXPORT = qw(pod2html htmlify); @EXPORT_OK = qw(anchorify); @@ -486,7 +486,7 @@ sub parse_command_line { my ($opt_backlink,$opt_cachedir,$opt_css,$opt_flush,$opt_header, $opt_help,$opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile, $opt_outfile,$opt_poderrors,$opt_podpath,$opt_podroot, - $opt_quiet,$opt_recurse,$opt_title,$opt_verbose,$opt_libpods); + $opt_quiet,$opt_recurse,$opt_title,$opt_verbose); unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html}; my $result = GetOptions( @@ -500,7 +500,6 @@ sub parse_command_line { 'htmlroot=s' => \$opt_htmlroot, 'index!' => \$opt_index, 'infile=s' => \$opt_infile, - 'libpods=s' => \$opt_libpods, # deprecated 'outfile=s' => \$opt_outfile, 'poderrors!' => \$opt_poderrors, 'podpath=s' => \$opt_podpath, @@ -516,7 +515,6 @@ sub parse_command_line { $opt_help = ""; # just to make -w shut-up. @Podpath = split(":", $opt_podpath) if defined $opt_podpath; - warn "--libpods is no longer supported" if defined $opt_libpods; $Backlink = $opt_backlink if defined $opt_backlink; $Cachedir = _unixify($opt_cachedir) if defined $opt_cachedir; diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm index 67662e4010..7eb8e30ed8 100644 --- a/ext/attributes/attributes.pm +++ b/ext/attributes/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.28; +our $VERSION = 0.29; @EXPORT_OK = qw(get reftype); @EXPORT = (); @@ -38,7 +38,8 @@ sub _modify_attrs_and_deprecate { grep { $deprecated{$svtype} && /$deprecated{$svtype}/ ? do { require warnings; - warnings::warnif('deprecated', "Attribute \"$1\" is deprecated"); + warnings::warnif('deprecated', "Attribute \"$1\" is deprecated, " . + "and will disappear in Perl 5.28"); 0; } : $svtype eq 'CODE' && exists $msg{$_} ? do { require warnings; @@ -258,7 +259,8 @@ attribute will be sanity checked at compile time. =item locked The "locked" attribute is deprecated, and has no effect in 5.10.0 and later. -It was used as part of the now-removed "Perl 5.005 threads". +It was used as part of the now-removed "Perl 5.005 threads". It will +disappear in Perl 5.28, after which its use will be fatal. =item const @@ -283,7 +285,8 @@ when used in conjunction with the L<threads> and L<threads::shared> modules. The "unique" attribute is deprecated, and has no effect in 5.10.0 and later. It used to indicate that a single copy of an C<our> variable was to be used by all interpreters should the program happen to be running in a -multi-interpreter environment. +multi-interpreter environment. It will disappear in 5.28, after which its +use will be fatal. =back diff --git a/gv.c b/gv.c index 2570cf0657..fff8e95c75 100644 --- a/gv.c +++ b/gv.c @@ -1217,7 +1217,8 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags) ) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), "Use of inherited AUTOLOAD for non-method %" SVf - "::%" UTF8f "() is deprecated", + "::%" UTF8f "() is deprecated. This will be " + "fatal in Perl 5.28", SVfARG(packname), UTF8fARG(is_utf8, len, name)); @@ -2156,9 +2157,10 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, case '*': /* $* */ case '#': /* $# */ if (sv_type == SVt_PV) - /* diag_listed_as: $* is no longer supported */ + /* diag_listed_as: $* is no longer supported. Its use will be fatal in Perl 5.30 */ Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), - "$%c is no longer supported", *name); + "$%c is no longer supported. Its use " + "will be fatal in Perl 5.30", *name); break; case '\010': /* $^H */ { @@ -2268,10 +2270,11 @@ S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type) require_tie_mod_s(gv, *name, "Tie::Hash::NamedCapture", 0); } else if (sv_type == SVt_PV) { if (*name == '*' || *name == '#') { - /* diag_listed_as: $* is no longer supported */ + /* diag_listed_as: $# is no longer supported. Its use will be fatal in Perl 5.30 */ Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), - "$%c is no longer supported", *name); + "$%c is no longer supported. Its use " + "will be fatal in Perl 5.30", *name); } } if (sv_type==SVt_PV || sv_type==SVt_PVGV) { diff --git a/handy.h b/handy.h index dd3e01c8bf..4d2f4bc933 100644 --- a/handy.h +++ b/handy.h @@ -2477,6 +2477,12 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe #ifdef PERL_CORE # define deprecate(s) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \ "Use of " s " is deprecated") +# define deprecate_disappears_in(when,message) \ + Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \ + message ", and will disappear in Perl " when) +# define deprecate_fatal_in(when,message) \ + Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \ + message ". Its use will be fatal in Perl " when) #endif /* Internal macros to deal with gids and uids */ diff --git a/mg.c b/mg.c index e945658b84..69fdc93ae8 100644 --- a/mg.c +++ b/mg.c @@ -2709,8 +2709,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) else { if (strEQ(mg->mg_ptr + 1, "NCODING") && SvOK(sv)) if (PL_localizing != 2) { - Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "${^ENCODING} is no longer supported"); + deprecate_fatal_in("5.28", + "${^ENCODING} is no longer supported"); } } break; @@ -2890,17 +2890,19 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) if (SvROK(sv)) { SV *referent= SvRV(sv); const char *reftype= sv_reftype(referent, 0); - /* XXX: dodgy type check: This leaves me feeling dirty, but the alternative - * is to copy pretty much the entire sv_reftype() into this routine, or to do - * a full string comparison on the return of sv_reftype() both of which - * make me feel worse! NOTE, do not modify this comment without reviewing the - * corresponding comment in sv_reftype(). - Yves */ + /* XXX: dodgy type check: This leaves me feeling dirty, but + * the alternative is to copy pretty much the entire + * sv_reftype() into this routine, or to do a full string + * comparison on the return of sv_reftype() both of which + * make me feel worse! NOTE, do not modify this comment + * without reviewing the corresponding comment in + * sv_reftype(). - Yves */ if (reftype[0] == 'S' || reftype[0] == 'L') { IV val= SvIV(referent); if (val <= 0) { tmpsv= &PL_sv_undef; Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef", + "Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28", SvIV(SvRV(sv)) < 0 ? "a negative integer" : "zero" ); } diff --git a/op.c b/op.c index c213bb684f..2c4935ec81 100644 --- a/op.c +++ b/op.c @@ -6974,7 +6974,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) && !(o2->op_private & OPpPAD_STATE)) { Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "Deprecated use of my() in false conditional"); + "Deprecated use of my() in false conditional. " + "This will be a fatal error in Perl 5.30"); } *otherp = NULL; diff --git a/op.h b/op.h index c0e6386985..90f63e3227 100644 --- a/op.h +++ b/op.h @@ -1075,7 +1075,8 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>. #if defined(PERL_IN_DOOP_C) || defined(PERL_IN_PP_C) static const char * const deprecated_above_ff_msg = "Use of strings with code points over 0xFF as arguments to " - "%s operator is deprecated"; + "%s operator is deprecated. This will be a fatal error in " + "Perl 5.28"; #endif diff --git a/pad.c b/pad.c index 6d2d008b0f..5bbb07a092 100644 --- a/pad.c +++ b/pad.c @@ -2159,7 +2159,8 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, HV *cloned, "Constants from lexical " "variables potentially " "modified elsewhere are " - "deprecated"); + "deprecated. This will not " + "be allowed in Perl 5.32"); /* We *copy* the lexical variable, and donate the copy to newCONSTSUB. Yes, this is ugly, and should be killed. We need to do this for the diff --git a/pod/perl.pod b/pod/perl.pod index b26d594944..7ba8f613f3 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -44,7 +44,7 @@ path perlglossary cpan/perlfaq/lib/ path perlxs(?:tut|typemap)? dist/ExtUtils-ParseXS/lib/ path perldoc cpan/Pod-Perldoc/ -aux c2ph h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp +aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp =end buildtoc @@ -98,6 +98,7 @@ aux c2ph h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp perlpodspec Perl plain old documentation format specification perlpodstyle Perl POD style guide perldiag Perl diagnostic messages + perldeprecation Perl deprecations perllexwarn Perl warnings and their control perldebug Perl debugging perlvar Perl predefined variables diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a375b74ebf..f2f7e4b6c9 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -317,13 +317,108 @@ XXX L<message|perldiag/"message"> =head2 Changes to Existing Diagnostics -XXX Changes (i.e. rewording) of diagnostic messages go here +As of Perl 5.26.9, all new deprecations will come with a version in +which the feature will disappear. And with a few exceptions, most +existing deprecations will state when they'll disappear. As such, most +deprecation messages have changed. =over 4 =item * -XXX Describe change here +Attribute "locked" is deprecated, and will disappear in Perl 5.28 + +=item * + +Attribute "unique" is deprecated, and will disappear in Perl 5.28 + +=item * + +"\c%c" is more clearly written simply as "%s". This will be a fatal error +in Perl 5.28 + +=item * + +Constants from lexical variables potentially modified elsewhere are +deprecated. This will not be allowed in Perl 5.32 + +=item * + +Deprecated use of my() in false conditional. This will be a fatal error +in Perl 5.30 + +=item * + +dump() better written as CORE::dump(). dump() will no longer be available +in Perl 5.30 + +=item * + +${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28 + +=item * + +File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() +instead. + +=item * + +%s() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30 + +=item * + +$* is no longer supported. Its use will be fatal in Perl 5.30 + +=item * + +$* is no longer supported. Its use will be fatal in Perl 5.30 + +=item * + +Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28 + +=item * + +Opening filehandle %s also as a directory. This will be a fatal +error in Perl 5.28 + +=item * + +Setting $/ to a reference to %s as a form of slurp is deprecated, +treating as undef. This will be fatal in Perl 5.28 + +=item * + +Unescaped left brace in regex is deprecated here (and will be fatal +in Perl 5.30), passed through in regex; marked by S<<-- HERE> in m/%s/ + +=item * + +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 + +=item * + +Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28 + +=item * + +Use of code point 0x%s is deprecated; the permissible max is 0x%s. +This will be fatal in Perl 5.28 + +=item * + +Use of comma-less variable list is deprecated. Its use will be fatal +in Perl 5.28 + +=item * + +Use of inherited AUTOLOAD for non-method %s() is deprecated. This +will be fatal in Perl 5.28 + +=item * + +Use of strings with code points over 0xFF as arguments to %s operator +is deprecated. This will be a fatal error in Perl 5.28 =back diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod new file mode 100644 index 0000000000..d74a4feaf6 --- /dev/null +++ b/pod/perldeprecation.pod @@ -0,0 +1,427 @@ +=head1 NAME + +perldeprecation - list Perl deprecations + +=head1 DESCRIPTION + +The purpose of this document is to document what has been deprecated +in Perl, and by which version the deprecated feature will disappear, +or, for already removed features, when it was removed. + +This document will try to discuss what alternatives for the deprecated +features are available. + +The deprecated features will be grouped by the version of Perl in +which they will be removed. + +=head2 Perl 5.32 + +=head3 Constants from lexical variables potentially modified elsewhere + +You wrote something like + + my $var; + $sub = sub () { $var }; + +but $var is referenced elsewhere and could be modified after the C<sub> +expression is evaluated. Either it is explicitly modified elsewhere +(C<$var = 3>) or it is passed to a subroutine or to an operator like +C<printf> or C<map>, which may or may not modify the variable. + +Traditionally, Perl has captured the value of the variable at that +point and turned the subroutine into a constant eligible for inlining. +In those cases where the variable can be modified elsewhere, this +breaks the behavior of closures, in which the subroutine captures +the variable itself, rather than its value, so future changes to the +variable are reflected in the subroutine's return value. + +If you intended for the subroutine to be eligible for inlining, then +make sure the variable is not referenced elsewhere, possibly by +copying it: + + my $var2 = $var; + $sub = sub () { $var2 }; + +If you do want this subroutine to be a closure that reflects future +changes to the variable that it closes over, add an explicit C<return>: + + my $var; + $sub = sub () { return $var }; + +This usage has been deprecated, and will no longer be allowed in Perl 5.32. + +=head2 Perl 5.30 + +=head3 C<< $* >> is no longer supported + +Before Perl 5.10, setting C<< $* >> to a true value globally enabled +multi-line matching within a string. This relique from the past lost +its special meaning in 5.10. Use of this variable will be a fatal error +in Perl 5.30, freeing the variable up for a future special meaning. + +To enable multiline matching one should use the C<< /m >> regexp +modifier (possibly in combination with C<< /s >>). This can be set +on a per match bases, or can be enabled per lexical scope (including +a whole file) with C<< use re '/m' >>. + +=head3 C<< $# >> is no longer supported + +This variable used to have a special meaning -- it could be used +to control how numbers were formatted when printed. This seldom +used functionality was removed in Perl 5.10. In order to free up +the variable for a future special meaning, its use will be a fatal +error in Perl 5.30. + +To specify how numbers are formatted when printed, one is adviced +to use C<< printf >> or C<< sprintf >> instead. + +=head3 C<< File::Glob::glob() >> will disappear + +C<< File::Glob >> has a function called C<< glob >>, which just calls +C<< bsd_glob >>. However, its prototype is different from the prototype +of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should not +be used. + +C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation +message was issued from Perl 5.26 onwards, and the function will +disappear in Perl 5.30. + +Code using C<< File::Glob::glob() >> should call +C<< File::Glob::bsd_glob() >> instead. + + +=head3 Unescaped left braces in regular expressions + +The simple rule to remember, if you want to match a literal C<{> +character (U+007B C<LEFT CURLY BRACKET>) in a regular expression +pattern, is to escape each literal instance of it in some way. +Generally easiest is to precede it with a backslash, like C<\{> +or enclose it in square brackets (C<[{]>). If the pattern +delimiters are also braces, any matching right brace (C<}>) should +also be escaped to avoid confusing the parser, for example, + + qr{abc\{def\}ghi} + +Forcing literal C<{> characters to be escaped will enable the Perl +language to be extended in various ways in future releases. To avoid +needlessly breaking existing code, the restriction is is not enforced in +contexts where there are unlikely to ever be extensions that could +conflict with the use there of C<{> as a literal. + +Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it +started to give deprecation warnings since. These cases were made fatal +in Perl 5.26. Due to an oversight, not all cases of a use of a literal +C<{> got a deprecation warning. These cases started warning in Perl 5.26, +and they will be fatal by Perl 5.30. + +=head3 Unqualified C<dump()> + +Use of C<dump()> instead of C<CORE::dump()> was deprecated in Perl 5.8, +and an unqualified C<dump()> will no longer be available in Perl 5.30. + +See L<perlfunc/dump>. + + +=head2 Using my() in false conditional. + +There has been a long-standing bug in Perl that causes a lexical variable +not to be cleared at scope exit when its declaration includes a false +conditional. Some people have exploited this bug to achieve a kind of +static variable. Since we intend to fix this bug, we don't want people +relying on this behavior. + +Instead, it's recommended one uses C<state> variables to achieve the +same effect: + + use 5.10.0; + sub count {state $counter; return ++ $counter} + say count (); # Prints 1 + say count (); # Prints 2 + +C<state> variables were introduced in Perl 5.10. + +Alternatively, you can achieve a similar static effect by +declaring the variable in a separate block outside the function, eg + + sub f { my $x if 0; return $x++ } + +becomes + + { my $x; sub f { return $x++ } } + +The use of C<my()> in a false conditional has been deprecated in +Perl 5.10, and it will become a fatal error in Perl 5.30. + + +=head3 Reading/writing bytes from/to :utf8 handles. + +The sysread(), recv(), syswrite() and send() operators are +deprecated on handles that have the C<:utf8> layer, either explicitly, or +implicitly, eg., with the C<:encoding(UTF-16LE)> layer. + +Both sysread() and recv() currently use only the C<:utf8> flag for the stream, +ignoring the actual layers. Since sysread() and recv() do no UTF-8 +validation they can end up creating invalidly encoded scalars. + +Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise ignoring +any layers. If the flag is set, both write the value UTF-8 encoded, even if +the layer is some different encoding, such as the example above. + +Ideally, all of these operators would completely ignore the C<:utf8> state, +working only with bytes, but this would result in silently breaking existing +code. To avoid this a future version of perl will throw an exception when +any of sysread(), recv(), syswrite() or send() are called on handle with the +C<:utf8> layer. + +In Perl 5.30, it will no longer be possible to use sysread(), recv(), +syswrite() or send() to read or send bytes from/to :utf8 handles. + +=head2 Perl 5.28 + +=head3 Attribute "%s" is deprecated, and will disappear in 5.28 + +The attributes C<< :locked >> (on code references) and C<< :unique >> +(on array, hash and scalar references) have had no effect since +Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated +since. + +These attributes will no longer be recognized in Perl 5.28, and will +then result in a syntax error. Since the attributes do not do anything, +removing them from your code fixes the deprecation warning; and removing +them will not influence the behaviour of your code. + + +=head3 Bare here-document terminators + +Perl has allowed you to use a bare here-document terminator to have the +here-document end at the first empty line. This practise was deprecated +in Perl 5.000, and this will be a fatal error in Perl 5.28. + +You are encouraged to use the explictly quoted form if you wish to +use an empty line as the terminator of the here-document: + + print <<""; + Print this line. + + # Previous blank line ends the here-document. + + +=head3 Setting $/ to a reference to a non-positive integer + +You assigned a reference to a scalar to C<$/> where the +referenced item is not a positive integer. In older perls this B<appeared> +to work the same as setting it to C<undef> but was in fact internally +different, less efficient and with very bad luck could have resulted in +your file being split by a stringified form of the reference. + +In Perl 5.20.0 this was changed so that it would be B<exactly> the same as +setting C<$/> to undef, with the exception that this warning would be +thrown. + +In Perl 5.28, this will throw a fatal error. + +You are recommended to change your code to set C<$/> to C<undef> explicitly +if you wish to slurp the file. + + +=head3 Limit on the value of Unicode code points. + +Unicode only allows code points up to 0x10FFFF, but Perl allows much +larger ones. However, using code points exceeding the maximum value +of an integer (C<IV_MAX>) may break the perl interpreter in some constructs, +including causing it to hang in a few cases. The known problem areas +are in C<tr///>, regular expression pattern matching using quantifiers, +as quote delimiters in C<qI<X>...I<X>> (where I<X> is the C<chr()> of a large +code point), and as the upper limits in loops. + +The use of out of range code points was deprecated in Perl 5.24, and +it will be a fatal error in Perl 5.28. + +If your code is to run on various platforms, keep in mind that the upper +limit depends on the platform. It is much larger on 64-bit word sizes +than 32-bit ones. + + +=head3 Use of comma-less variable list in formats. + +It's allowed to use a list of variables in a format, without +separating them with commas. This usage has been deprecated +for a long time, and it will be a fatal error in Perl 5.28. + + + +=head3 Use of C<\N{}> + +Use of C<\N{}> with nothing between the braces was deprecated in +Perl 5.24, and will throw a fatal error in Perl 5.28. + +Since such a construct is equivalent to using an empty string, +you are recommended to remove such C<\N{}> constructs. + + +=head3 Using the same symbol to open a filehandle and a dirhandle + +It used to be legal to use C<open()> to associate both a +filehandle and a dirhandle to the same symbol (glob or scalar). +This idiom is likely to be confusing, and it was deprecated in +Perl 5.10. + +Using the same symbol to C<open()> a filehandle and a dirhandle +will be a fatal error in Perl 5.28. + +You should be using two different symbols instead. + +=head3 ${^ENCODING} is no longer supported. + +The special variable C<${^ENCODING}> was used to implement +the C<encoding> pragma. Setting this variable to anything other +than C<undef> was deprecated in Perl 5.22. Full deprecation +of the variable happened in Perl 5.25.3. + +Setting this variable will become a fatal error in Perl 5.28. + + +=head3 C<< B::OP::terse >> + +This method, which just calls C<< B::Concise::b_terse >>, has been +deprecated, and will disappear in Perl 5.28. Please use +C<< B::Concise >> instead. + + + +=head3 Use of inherited AUTOLOAD for non-method %s() is deprecated + +As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked +up as methods (using the C<@ISA> hierarchy) even when the subroutines +to be autoloaded were called as plain functions (e.g. C<Foo::bar()>), +not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>). + +This bug will be rectified in future by using method lookup only for +methods' C<AUTOLOAD>s. + +The simple rule is: Inheritance will not work when autoloading +non-methods. The simple fix for old code is: In any module that used +to depend on inheriting C<AUTOLOAD> for non-methods from a base class +named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during +startup. + +In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> +you should remove AutoLoader from @ISA and change C<use AutoLoader;> to +C<use AutoLoader 'AUTOLOAD';>. + +This feature was deprecated in Perl 5.004, and will be fatal in Perl 5.28. + + +=head3 Use of C<< \cI<X> >> to specify a printable character. + +In a double quoted context, Perl has the C<< \c >> construct to write +control characters in a readable way. For instance, the tab character +can be written as C<< \cI >> (I<< control-I >>), and the escape +character can be written as C<< \c[ >>. + +Due to implementation details, the C<< \c >> construct can be used +to create regular, printable, characters as well. For instance, +C<< \c >> maps a C<< , >> to C<< l >>; that is C<< \c, >> is an +obscure way of writing C<< l >>. And not only that, it's also not +portable between ASCII and EBCDIC platforms. + +Using the C<< \c >> construct with an argument which maps to a +printable character was deprecated in Perl 5.14, and will be a fatal +error in Perl 5.28. You're recommended to just write the intended +character instead. + + +=head3 Use of code points over 0xFF in string bitwise operators + +The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat +their operands as strings of bytes. As such, values above 0xFF +are nonsensical. Using such code points with these operators +was deprecated in Perl 5.24, and will be fatal in Perl 5.28. + + +=head2 Perl 5.26 + +=head3 C<< --libpods >> in C<< Pod::Html >> + +Since Perl 5.18, the option C<< --libpods >> has been deprecated, and +using this option did not do anything other than producing a warning. + +The C<< --libpods >> option is no longer recognized in Perl 5.26. + + +=head3 The utilities C<< c2ph >> and C<< pstruct >> + +These old, perl3-era utilities have been deprecated in favour of +C<< h2xs >> for a long time. In Perl 5.26, they have been removed. + + +=head3 Trapping C<< $SIG {__DIE__} >> other than during program exit. + +The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was +never intended to happen this way, but an implementation glitch made +this possible. This used to be deprecated, as it allowed strange action +at a distance like rewriting a pending exception in C<$@>. Plans to +rectify this have been scrapped, as users found that rewriting a +pending exception is actually a useful feature, and not a bug. + +Perl never issued a deprecation warning for this; the deprecation +was by documentation policy only. But this deprecation has been +lifted in Perl 5.26. + + +=head3 Malformed UTF-8 string in "%s" + +This message indicates a bug either in the Perl core or in XS +code. Such code was trying to find out if a character, allegedly +stored internally encoded as UTF-8, was of a given type, such as +being punctuation or a digit. But the character was not encoded +in legal UTF-8. The C<%s> is replaced by a string that can be used +by knowledgeable people to determine what the type being checked +against was. + +Passing malformed strings was deprecated in Perl 5.18, and +became fatal in Perl 5.26. + + +=head2 Perl 5.24 + +=head3 Use of C<< *glob{FILEHANDLE} >> + +The use of C<< *glob{FILEHANDLE} >> was deprecated in Perl 5.8. +The intention was to use C<< *glob{IO} >> instead, for which +C<< *glob{FILEHANDLE} >> is an alias. + +However, this feature was undeprecated in Perl 5.24. + +=head3 Calling POSIX::%s() is deprecated + +The following functions in the C<POSIX> module are no longer available: +C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>, +C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The +functions are buggy and don't work on UTF-8 encoded strings. See their +entries in L<POSIX> for more information. + +The functions were deprecated in Perl 5.20, and removed in Perl 5.24. + + +=head2 Perl 5.16 + +=head3 Use of %s on a handle without * is deprecated + +It used to be possible to use C<tie>, C<tied> or C<untie> on a scalar +while the scalar holds a typeglob. This caused its filehandle to be +tied. It left no way to tie the scalar itself when it held a typeglob, +and no way to untie a scalar that had had a typeglob assigned to it. + +This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16. + +So now C<tie $scalar> will always tie the scalar, not the handle it holds. +To tie the handle, use C<tie *$scalar> (with an explicit asterisk). The same +applies to C<tied *$scalar> and C<untie *$scalar>. + + +=head1 SEE ALSO + +L<warnings>, L<diagnostics>. + +=cut diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 4de4574139..afdcb7301e 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -418,12 +418,12 @@ assigning through that reference. For example used as an lvalue, which is pretty strange. Perhaps you forgot to dereference it first. See L<perlfunc/substr>. -=item Attribute "locked" is deprecated +=item Attribute "locked" is deprecated, and will disappear in Perl 5.28 (D deprecated) You have used the attributes pragma to modify the "locked" attribute on a code reference. The :locked attribute is obsolete, has had no effect since 5005 threads were removed, and -will be removed in a future release of Perl 5. +will be removed in a Perl 5.28. =item Attribute prototype(%s) discards earlier prototype attribute in same sub @@ -431,12 +431,12 @@ will be removed in a future release of Perl 5. example. Since each sub can only have one prototype, the earlier declaration(s) are discarded while the last one is applied. -=item Attribute "unique" is deprecated +=item Attribute "unique" is deprecated, and will disappear in Perl 5.28 (D deprecated) You have used the attributes pragma to modify the "unique" attribute on an array, hash or scalar reference. The :unique attribute has had no effect since Perl 5.8.8, and -will be removed in a future release of Perl 5. +will be removed in a Perl 5.28. =item av_reify called on tied array @@ -666,11 +666,6 @@ checking. Alternatively, if you are certain that you're calling the function correctly, you may put an ampersand before the name to avoid the warning. See L<perlsub>. -=item Calling POSIX::%s() is deprecated - -(D deprecated) You called a function whose use is deprecated. See -the function's name in L<POSIX> for details. - =item Cannot chr %f (F) You passed an invalid number (like an infinity or not-a-number) to C<chr>. @@ -1544,7 +1539,7 @@ Perhaps you need to copy the value to a temporary, and repeat that. Note that ASCII characters that don't map to control characters are discouraged, and will generate the warning (when enabled) -L</""\c%c" is more clearly written simply as "%s"">. +L</""\c%c" is more clearly written simply as "%s". This will be a fatal error in Perl 5.28">. =item Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/ @@ -1651,13 +1646,15 @@ See L<charnames/CUSTOM ALIASES>. (W unopened) You tried chdir() on a filehandle that was never opened. -=item "\c%c" is more clearly written simply as "%s" +=item "\c%c" is more clearly written simply as "%s". This will be a fatal error in Perl 5.28 + +(D deprecated, syntax) The C<\cI<X>> construct is intended to be a +way to specify non-printable characters. You used it for a printable +one, which is better written as simply itself, perhaps preceded by +a backslash for non-word characters. Doing it the way you did is +not portable between ASCII and EBCDIC platforms. -(W syntax) The C<\cI<X>> construct is intended to be a way to specify -non-printable characters. You used it for a printable one, which -is better written as simply itself, perhaps preceded by a backslash -for non-word characters. Doing it the way you did is not portable -between ASCII and EBCDIC platforms. +This usage is going to result in a fatal error in Perl 5.28. =item Cloning substitution context is unimplemented @@ -1797,7 +1794,7 @@ usually indicates a syntax error in dereferencing the constant value. See L<perlsub/"Constant Functions"> and L<constant>. =item Constants from lexical variables potentially modified elsewhere are -deprecated +deprecated. This will not be allowed in Perl 5.32 (D deprecated) You wrote something like @@ -1816,8 +1813,8 @@ breaks the behavior of closures, in which the subroutine captures the variable itself, rather than its value, so future changes to the variable are reflected in the subroutine's return value. -This usage is deprecated, because the behavior is likely to change -in a future version of Perl. +This usage is deprecated, and will no longer be allowed in Perl 5.32, +making it possible to change the behavior in the future. If you intended for the subroutine to be eligible for inlining, then make sure the variable is not referenced elsewhere, possibly by @@ -1982,7 +1979,7 @@ or a hash or array slice, such as: long for Perl to handle. You have to be seriously twisted to write code that triggers this error. -=item Deprecated use of my() in false conditional +=item Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 (D deprecated) You used a declaration similar to C<my $x if 0>. There has been a long-standing bug in Perl that causes a lexical variable @@ -2003,6 +2000,9 @@ lexicals that are initialized only once (see L<feature>): sub f { state $x; return $x++ } +This use of C<my()> in a false conditional has been deprecated since +Perl 5.10, and it will become a fatal error in Perl 5.30. + =item DESTROY created new reference to dead object '%s' (F) A DESTROY() method created a new reference to the object which is @@ -2080,10 +2080,15 @@ something that isn't defined yet, you don't actually have to define the subroutine or package before the current location. You can use an empty "sub foo;" or "package FOO;" to enter a "forward" declaration. -=item dump() better written as CORE::dump() +=item dump() better written as CORE::dump(). dump() will no longer be available in Perl 5.30 + +(D deprecated, misc) You used the obsolescent C<dump()> built-in function, +without fully qualifying it as C<CORE::dump()>. Maybe it's a typo. + +Use of a unqualified C<dump()> was deprecated in Perl 5.30, and this +will not be available in Perl 5.30. -(W misc) You used the obsolescent C<dump()> built-in function, without fully -qualifying it as C<CORE::dump()>. Maybe it's a typo. See L<perlfunc/dump>. +See L<perlfunc/dump>. =item dump is not supported @@ -2114,11 +2119,13 @@ unlikely to be what you want. described in L<perlunicode> and L<perlre>. You used C<\p> or C<\P> in a regular expression without specifying the property name. -=item ${^ENCODING} is no longer supported +=item ${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28 (D deprecated) The special variable C<${^ENCODING}>, formerly used to implement the C<encoding> pragma, is no longer supported as of Perl 5.26.0. +Setting this variable will become a fatal error in Perl 5.28. + =item entering effective %s failed (F) While under the C<use filetest> pragma, switching the real and @@ -2325,6 +2332,20 @@ which can't encode values above 63. So there is no point in asking for a line length bigger than that. Perl will behave as if you specified C<u63> as the format. +=item File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. + +(D deprecated) C<< File::Glob >> has a function called C<< glob >>, which +just calls C<< bsd_glob >>. However, its prototype is different from the +prototype of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should +not be used. + +C<< File::Glob::glob() >> was deprecated in perl 5.8.0. A deprecation +message was issued from perl 5.26.0 onwards, and the function will +disappear in perl 5.30.0. + +Code using C<< File::Glob::glob() >> should call +C<< File::Glob::bsd_glob() >> instead. + =item Filehandle %s opened only for input (W io) You tried to write on a read-only filehandle. If you intended @@ -3091,7 +3112,7 @@ neither as a system call nor an ioctl call (SIOCATMARK). Perl. The current valid ones are given in L<perlrebackslash/\b{}, \b, \B{}, \B>. -=item %s() is deprecated on :utf8 handles +=item %s() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30 (D deprecated) The sysread(), recv(), syswrite() and send() operators are deprecated on handles that have the C<:utf8> layer, either explicitly, or @@ -3107,19 +3128,20 @@ the layer is some different encoding, such as the example above. Ideally, all of these operators would completely ignore the C<:utf8> state, working only with bytes, but this would result in silently breaking existing -code. To avoid this a future version of perl will throw an exception when -any of sysread(), recv(), syswrite() or send() are called on handle with the -C<:utf8> layer. +code. -=item "%s" is more clearly written simply as "%s" in regex; marked by S<<-- HERE> in m/%s/ +In Perl 5.30, it will no longer be possible to use sysread(), recv(), +syswrite() or send() to read or send bytes from/to :utf8 handles. -(W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) +=item "%s" is more clearly written simply as "%s" in regex. This will be a fatal error in Perl 5.28; marked by S<<-- HERE> in m/%s/ + +(W deprecated, regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) You specified a character that has the given plainer way of writing it, and which is also portable to platforms running with different character -sets. +sets. This usage is deprecated, and will be a fatal error in Perl 5.28. -=item $* is no longer supported +=item $* is no longer supported. Its use will be fatal in Perl 5.30 (D deprecated, syntax) The special variable C<$*>, deprecated in older perls, has been removed as of 5.10.0 and is no longer supported. In @@ -3131,12 +3153,16 @@ modifiers. You can enable C</m> for a lexical scope (even a whole file) with C<use re '/m'>. (In older versions: when C<$*> was set to a true value then all regular expressions behaved as if they were written using C</m>.) -=item $# is no longer supported +Use of this variable will be a fatal error in Perl 5.30. + +=item $# is no longer supported. Its use will be fatal in Perl 5.30 (D deprecated, syntax) The special variable C<$#>, deprecated in older perls, has been removed as of 5.10.0 and is no longer supported. You should use the printf/sprintf functions instead. +Use of this variable will be a fatal error in Perl 5.30. + =item '%s' is not a code reference (W overload) The second (fourth, sixth, ...) argument of @@ -3410,6 +3436,19 @@ rules and perl was unable to guess how to make more progress. (F) You tried to unpack something that didn't comply with UTF-8 encoding rules and perl was unable to guess how to make more progress. +=item Malformed UTF-8 string in "%s" + +(F) This message indicates a bug either in the Perl core or in XS +code. Such code was trying to find out if a character, allegedly +stored internally encoded as UTF-8, was of a given type, such as +being punctuation or a digit. But the character was not encoded +in legal UTF-8. The C<%s> is replaced by a string that can be used +by knowledgeable people to determine what the type being checked +against was. + +Passing malformed strings was deprecated in Perl 5.18, and +became fatal in Perl 5.26. + =item Malformed UTF-16 surrogate (F) Perl thought it was reading UTF-16 encoded character data but while @@ -4249,19 +4288,21 @@ that isn't open. Check your control flow. See also L<perlfunc/-X>. (S internal) An internal warning that the grammar is screwed up. -=item Opening dirhandle %s also as a file +=item Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28 (D io, deprecated) You used open() to associate a filehandle to a symbol (glob or scalar) that already holds a dirhandle. Although legal, this idiom might render your code confusing -and is deprecated. +and this was deprecated in Perl 5.10. In Perl 5.28, this +will be a fatal error. -=item Opening filehandle %s also as a directory +=item Opening filehandle %s also as a directory. This will be a fatal error in Perl 5.28 (D io, deprecated) You used opendir() to associate a dirhandle to a symbol (glob or scalar) that already holds a filehandle. Although legal, this idiom might render your code confusing -and is deprecated. +and this was deprecated in Perl 5.10. In Perl 5.28, this +will be a fatal error. =item Operand with no preceding operator in regex; marked by S<<-- HERE> in m/%s/ @@ -5522,12 +5563,7 @@ didn't think so. forget to check the return value of your socket() call? See L<perlfunc/setsockopt>. -=item Setting ${^ENCODING} is deprecated - -(D deprecated) You assigned a non-C<undef> value to C<${^ENCODING}>. -This is deprecated; see C<L<perlvar/${^ENCODING}>> for details. - -=item Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef +=item Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 (D deprecated) You assigned a reference to a scalar to C<$/> where the referenced item is not a positive integer. In older perls this B<appeared> @@ -5540,8 +5576,8 @@ setting C<$/> to undef, with the exception that this warning would be thrown. You are recommended to change your code to set C<$/> to C<undef> explicitly -if you wish to slurp the file. In future versions of Perl assigning -a reference to will throw a fatal error. +if you wish to slurp the file. In Perl 5.28 assigning C<$/> to a +reference to an integer which isn't positive will throw a fatal error. =item Setting $/ to %s reference is forbidden @@ -6215,30 +6251,30 @@ C<undef *foo>. (A) You've accidentally run your script through B<csh> instead of Perl. Check the #! line, or manually feed your script into Perl yourself. -=item Unescaped left brace in regex is deprecated here, passed through in -regex; marked by S<<-- HERE> in m/%s/ +=item Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by S<<-- HERE> in m/%s/ (D deprecated, regexp) The simple rule to remember, if you want to -match a literal C<"{"> character (U+007B C<LEFT CURLY BRACKET>) in a +match a literal C<{> character (U+007B C<LEFT CURLY BRACKET>) in a regular expression pattern, is to escape each literal instance of it in some way. Generally easiest is to precede it with a backslash, like -C<"\{"> or enclose it in square brackets (C<"[{]">). If the pattern -delimiters are also braces, any matching right brace (C<"}">) should +C<\{> or enclose it in square brackets (C<[{]>). If the pattern +delimiters are also braces, any matching right brace (C<}>) should also be escaped to avoid confusing the parser, for example, qr{abc\{def\}ghi} -Forcing literal C<"{"> characters to be escaped will enable the Perl +Forcing literal C<{> characters to be escaped will enable the Perl language to be extended in various ways in future releases. To avoid needlessly breaking existing code, the restriction is is not enforced in contexts where there are unlikely to ever be extensions that could -conflict with the use there of C<"{"> as a literal. +conflict with the use there of C<{> as a literal. -In this release of Perl, some literal uses of C<"{"> are fatal, and some +In this release of Perl, some literal uses of C<{> are fatal, and some still just deprecated. This is because of an oversight: some uses of a -literal C<"{"> that should have raised a deprecation warning starting in +literal C<{> that should have raised a deprecation warning starting in v5.20 did not warn until v5.26. By making the already-warned uses fatal now, some of the planned extensions can be made to the language sooner. +The cases which are still allowed will be fatal in Perl 5.30. The contexts where no warnings or errors are raised are: @@ -6246,12 +6282,12 @@ The contexts where no warnings or errors are raised are: =item * -as the first character in a pattern, or following C<"^"> indicating to +as the first character in a pattern, or following C<^> indicating to anchor the match to the beginning of a line. =item * -as the first character following a C<"|"> indicating alternation. +as the first character following a C<|> indicating alternation. =item * @@ -6447,11 +6483,11 @@ exactly, regardless of whether C<:loose> is used or not.) This error may also happen if the C<\N{}> is not in the scope of the corresponding C<S<use charnames>>. -=item Unknown charname '' is deprecated +=item Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 (D deprecated) You had a C<\N{}> with nothing between the braces. This -usage is deprecated, and will be made a syntax error in a future Perl -version. +usage was deprecated in Perl 5.24, and will be made a syntax error in +in Perl 5.28. =item Unknown error @@ -6893,12 +6929,15 @@ returns no useful value. See L<perlmod>. (D deprecated) The C<$[> variable (index of the first element in an array) is deprecated. See L<perlvar/"$[">. -=item Use of bare << to mean <<"" is deprecated +=item Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28 (D deprecated) You are now encouraged to use the explicitly quoted form if you wish to use an empty line as the terminator of the here-document. +Use of a bare terminator was deprecated in Perl 5.000, and +will be a fatal error in Perl 5.28. + =item Use of /c modifier is meaningless in s/// (W regexp) You used the /c modifier in a substitution. The /c @@ -6910,7 +6949,7 @@ modifier is not presently meaningful in substitutions. use the /g modifier. Currently, /c is meaningful only when /g is used. (This may change in the future.) -=item Use of code point 0x%s is deprecated; the permissible max is 0x%s +=item Use of code point 0x%s is deprecated; the permissible max is 0x%s. This will be fatal in Perl 5.28 (D deprecated) You used a code point that will not be allowed in a future perl version, because it is too large. Unicode only allows code @@ -6927,11 +6966,16 @@ If your code is to run on various platforms, keep in mind that the upper limit depends on the platform. It is much larger on 64-bit word sizes than 32-bit ones. -=item Use of comma-less variable list is deprecated +The use of out of range code points was deprecated in Perl 5.24, and +it will be a fatal error in Perl 5.28. + +=item Use of comma-less variable list is deprecated. Its use will be fatal in Perl 5.28 (D deprecated) The values you give to a format should be separated by commas, not just aligned on a line. +This usage will be fatal in Perl 5.28. + =item Use of each() on hash after insertion without resetting hash iterator results in undefined behavior (S internal) The behavior of C<each()> after insertion is undefined; @@ -6976,11 +7020,6 @@ For speed and efficiency reasons, Perl internally does not do full reference-counting of iterated items, hence deleting such an item in the middle of an iteration causes Perl to see a freed value. -=item Use of *glob{FILEHANDLE} is deprecated - -(D deprecated) You are now encouraged to use the shorter *glob{IO} form -to access the filehandle slot within a typeglob. - =item Use of /g modifier is meaningless in split (W regexp) You used the /g modifier on the pattern for a C<split> @@ -6992,7 +7031,9 @@ repeatedly, the C</g> has no effect. (D deprecated) Using C<goto> to jump from an outer scope into an inner scope is deprecated and should be avoided. -=item Use of inherited AUTOLOAD for non-method %s() is deprecated +This was deprecated in Perl 5.12. + +=item Use of inherited AUTOLOAD for non-method %s() is deprecated. This will be fatal in Perl 5.28 (D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked up as methods (using the C<@ISA> hierarchy) @@ -7016,34 +7057,19 @@ In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> you should remove AutoLoader from @ISA and change C<use AutoLoader;> to C<use AutoLoader 'AUTOLOAD';>. +This feature was deprecated in Perl 5.004, and will be fatal in Perl 5.28. + =item Use of %s in printf format not supported (F) You attempted to use a feature of printf that is accessible from only C. This usually means there's a better way to do it in Perl. -=item Use of %s is deprecated - -(D deprecated) The construct indicated is no longer recommended for use, -generally because there's a better way to do it, and also because the -old way has bad side effects. - =item Use of -l on filehandle%s (W io) A filehandle represents an opened file, and when you opened the file it already went past any symlink you are presumably trying to look for. The operation returned C<undef>. Use a filename instead. -=item Use of %s on a handle without * is deprecated - -(D deprecated) You used C<tie>, C<tied> or C<untie> on a scalar but that scalar -happens to hold a typeglob, which means its filehandle will be tied. If -you mean to tie a handle, use an explicit * as in C<tie *$handle>. - -This was a long-standing bug that was removed in Perl 5.16, as there was -no way to tie the scalar itself when it held a typeglob, and no way to -untie a scalar that had had a typeglob assigned to it. If you see this -message, you must be using an older version. - =item Use of reference "%s" as array index (W misc) You tried to use a reference as an array index; this probably @@ -7062,13 +7088,15 @@ its behavior may change or even be removed in any future release of perl. See the explanation under L<perlvar/$_>. =item Use of strings with code points over 0xFF as arguments to %s -operator is deprecated +operator is deprecated. This will be a fatal error in Perl 5.28 (D deprecated) You tried to use one of the string bitwise operators (C<&> or C<|> or C<^> or C<~>) on a string containing a code point over 0xFF. The string bitwise operators treat their operands as strings of bytes, and values beyond 0xFF are nonsensical in this context. +Such usage will be a fatal error in Perl 5.28. + =item Use of tainted arguments in %s is deprecated (W taint, deprecated) You have supplied C<system()> or C<exec()> with multiple diff --git a/pod/perlport.pod b/pod/perlport.pod index cc47774fe9..c03e279be4 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -984,6 +984,29 @@ The very portable L<C<POSIX::uname()>|POSIX/C<uname>> will work too: c:\> perl -MPOSIX -we "print join '|', uname" Windows NT|moonru|5.0|Build 2195 (Service Pack 2)|x86 +Errors set by Winsock functions are now put directly into C<$^E>, +and the relevant C<WSAE*> error codes are now exported from the +L<Errno> and L<POSIX> modules for testing this against. + +The previous behavior of putting the errors (converted to POSIX-style +C<E*> error codes since Perl 5.20.0) into C<$!> was buggy due to +the non-equivalence of like-named Winsock and POSIX error constants, +a relationship between which has unfortunately been established +in one way or another since Perl 5.8.0. + +The new behavior provides a much more robust solution for checking +Winsock errors in portable software without accidentally matching +POSIX tests that were intended for other OSes and may have different +meanings for Winsock. + +The old behavior is currently retained, warts and all, for backwards +compatibility, but users are encouraged to change any code that +tests C<$!> against C<E*> constants for Winsock errors to instead +test C<$^E> against C<WSAE*> constants. After a suitable deprecation +period, which started with Perl 5.24, the old behavior may be +removed, leaving C<$!> unchanged after Winsock function calls, to +avoid any possible confusion over which error variable to check. + Also see: =over 4 @@ -2496,7 +2519,7 @@ L<perlunicode>, L<perlvms>, L<perlvos>, L<perlwin32>, and L<Win32>. =head1 AUTHORS / CONTRIBUTORS -Abigail <[email protected]>, +Abigail <[email protected]>, Charles Bailey <[email protected]>, Graham Barr <[email protected]>, Tom Christiansen <[email protected]>, diff --git a/pod/perlutil.pod b/pod/perlutil.pod index 4047b42e85..b41a611830 100644 --- a/pod/perlutil.pod +++ b/pod/perlutil.pod @@ -126,13 +126,6 @@ around - the F<.ph> file should be created by running F<h2ph> on the corresponding F<.h> file. See the F<h2ph> documentation for more on how to convert a whole bunch of header files at once. -=item L<c2ph|c2ph> and L<pstruct|pstruct> - -F<c2ph> and F<pstruct>, which are actually the same program but behave -differently depending on how they are called, provide another way of -getting at C with Perl - they'll convert C structures and union declarations -to Perl code. This is deprecated in favour of F<h2xs> these days. - =item L<h2xs|h2xs> F<h2xs> converts C header files into XS modules, and will try and write @@ -238,7 +231,7 @@ L<perldoc|perldoc>, L<pod2man|pod2man>, L<perlpod>, L<pod2html|pod2html>, L<pod2usage|pod2usage>, L<podselect|podselect>, L<podchecker|podchecker>, L<splain|splain>, L<perldiag>, C<roffitall|roffitall>, L<File::Find|File::Find>, L<pl2pm|pl2pm>, -L<perlbug|perlbug>, L<h2ph|h2ph>, L<c2ph|c2ph>, L<h2xs|h2xs>, L<enc2xs>, +L<perlbug|perlbug>, L<h2ph|h2ph>, L<h2xs|h2xs>, L<enc2xs>, L<xsubpp>, L<cpan>, L<instmodsh>, L<piconv>, L<prove>, L<corelist>, L<ptar>, L<ptardiff>, L<shasum>, L<zipdetails> diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 9c5fda7c36..b8c68b3455 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -659,13 +659,12 @@ or a C<die()>. The C<__DIE__> handler is explicitly disabled during the call, so that you can die from a C<__DIE__> handler. Similarly for C<__WARN__>. -Due to an implementation glitch, the C<$SIG{__DIE__}> hook is called -even inside an C<eval()>. Do not use this to rewrite a pending -exception in C<$@>, or as a bizarre substitute for overriding -C<CORE::GLOBAL::die()>. This strange action at a distance may be fixed -in a future release so that C<$SIG{__DIE__}> is only called if your -program is about to exit, as was the original intent. Any other use is -deprecated. +The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was +never intended to happen this way, but an implementation glitch made +this possible. This used to be deprecated, as it allowed strange action +at a distance like rewriting a pending exception in C<$@>. Plans to +rectify this have been scrapped, as users found that rewriting a +pending exception is actually a useful feature, and not a bug. C<__DIE__>/C<__WARN__> handlers are very special in one respect: they may be called to report (probable) errors found by the parser. In such diff --git a/pp_sys.c b/pp_sys.c index 11193bcbc6..d8e9c30467 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -630,7 +630,7 @@ PP(pp_open) if (IoDIRP(io)) Perl_ck_warner_d(aTHX_ packWARN2(WARN_IO, WARN_DEPRECATED), - "Opening dirhandle %" HEKf " also as a file", + "Opening dirhandle %" HEKf " also as a file. This will be a fatal error in Perl 5.28", HEKfARG(GvENAME_HEK(gv))); mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar); @@ -1719,7 +1719,8 @@ PP(pp_sysread) 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_d(aTHX_ packWARN(WARN_DEPRECATED), - "%s() is deprecated on :utf8 handles", + "%s() is deprecated on :utf8 handles. " + "This will be a fatal error in Perl 5.30", OP_DESC(PL_op)); } buffer = SvPVutf8_force(bufsv, blen); @@ -1982,7 +1983,8 @@ PP(pp_syswrite) if (PerlIO_isutf8(IoIFP(io))) { Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "%s() is deprecated on :utf8 handles", + "%s() is deprecated on :utf8 handles. " + "This will be a fatal error in Perl 5.30", OP_DESC(PL_op)); if (!SvUTF8(bufsv)) { /* We don't modify the original scalar. */ @@ -4008,7 +4010,7 @@ PP(pp_open_dir) if ((IoIFP(io) || IoOFP(io))) Perl_ck_warner_d(aTHX_ packWARN2(WARN_IO, WARN_DEPRECATED), - "Opening filehandle %" HEKf " also as a directory", + "Opening filehandle %" HEKf " also as a directory. This will be a fatal error in Perl 5.28", HEKfARG(GvENAME_HEK(gv)) ); if (IoDIRP(io)) PerlDir_close(IoDIRP(io)); diff --git a/regcomp.c b/regcomp.c index 2cbc94de41..d865c73c06 100644 --- a/regcomp.c +++ b/regcomp.c @@ -819,6 +819,13 @@ static const scan_data_t zero_scan_data = REPORT_LOCATION_ARGS(loc)); \ } STMT_END +#define vWARN4dep(loc, m, a1, a2, a3) STMT_START { \ + __ASSERT_(PASS2) Perl_warner(aTHX_ packWARN2(WARN_REGEXP,WARN_DEPRECATED), \ + m REPORT_LOCATION, \ + a1, a2, a3, \ + REPORT_LOCATION_ARGS(loc)); \ +} STMT_END + #define ckWARN4reg(loc, m, a1, a2, a3) STMT_START { \ __ASSERT_(PASS2) Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP), \ m REPORT_LOCATION, \ @@ -13788,7 +13795,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) skip_to_be_ignored_text(pRExC_state, &RExC_parse, FALSE /* Don't force to /x */ ); if (PASS2 && *RExC_parse == '{' && OP(ret) != SBOL && ! regcurly(RExC_parse)) { - ckWARNregdep(RExC_parse + 1, "Unescaped left brace in regex is deprecated here, passed through"); + ckWARNregdep(RExC_parse + 1, "Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through"); } return(ret); @@ -16866,20 +16873,22 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, literal[d++] = (char) value; literal[d++] = '\0'; - vWARN4(RExC_parse, - "\"%.*s\" is more clearly written simply as \"%s\"", + vWARN4dep(RExC_parse, + "\"%.*s\" is more clearly written simply as \"%s\". " + "This will be a fatal error in Perl 5.28", (int) (RExC_parse - rangebegin), rangebegin, literal - ); + ); } else if isMNEMONIC_CNTRL(value) { - vWARN4(RExC_parse, - "\"%.*s\" is more clearly written simply as \"%s\"", + vWARN4dep(RExC_parse, + "\"%.*s\" is more clearly written simply as \"%s\". " + "This will be a fatal error in Perl 5.28", (int) (RExC_parse - rangebegin), rangebegin, cntrl_to_mnemonic((U8) value) - ); + ); } } } diff --git a/t/lib/croak/pp_ctl b/t/lib/croak/pp_ctl index ee1edbaffa..ec664138e0 100644 --- a/t/lib/croak/pp_ctl +++ b/t/lib/croak/pp_ctl @@ -1,9 +1,10 @@ __END__ # NAME dump with computed label +no warnings 'deprecated'; my $label = "foo"; dump $label; EXPECT -Can't find label foo at - line 2. +Can't find label foo at - line 3. ######## # NAME when outside given use 5.01; no warnings 'experimental::smartmatch'; diff --git a/t/lib/warnings/2use b/t/lib/warnings/2use index 4e10d4b73d..a02505eff1 100644 --- a/t/lib/warnings/2use +++ b/t/lib/warnings/2use @@ -365,8 +365,8 @@ $*; use warnings "void"; $#; EXPECT -$* is no longer supported at - line 3. -$# is no longer supported at - line 5. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 5. Useless use of a variable in void context at - line 5. ######## @@ -375,5 +375,5 @@ $*; no warnings "void"; $#; EXPECT -$* is no longer supported at - line 3. -$# is no longer supported at - line 5. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 5. diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 77a93ced69..1dc71397b6 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -411,7 +411,7 @@ chomp ($x, $y); chop ($x, $y); EXPECT Use of uninitialized value $m1 in scalar assignment at - line 4. Use of uninitialized value $m1 in scalar assignment at - line 4. -Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef at - line 4. +Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 at - line 4. Use of uninitialized value $y in chop at - line 8. ######## use warnings 'uninitialized'; diff --git a/t/lib/warnings/doop b/t/lib/warnings/doop index bcc85a365a..a62bc23b0f 100644 --- a/t/lib/warnings/doop +++ b/t/lib/warnings/doop @@ -26,12 +26,12 @@ $_ = "\x{100}" & "\x{103}"; $_ = "\x{101}" | "\x{104}"; $_ = "\x{102}" ^ "\x{105}"; EXPECT -Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 1. -Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 2. -Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 3. -Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 4. -Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 5. -Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 6. -Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 7. -Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 8. -Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 9. +Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 1. +Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 2. +Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 3. +Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 4. +Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 5. +Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 6. +Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 7. +Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 8. +Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated. This will be a fatal error in Perl 5.28 at - line 9. diff --git a/t/lib/warnings/gv b/t/lib/warnings/gv index 8a93f8b632..c8e2b89acd 100644 --- a/t/lib/warnings/gv +++ b/t/lib/warnings/gv @@ -46,7 +46,7 @@ fred() ; my $x = \&barney; (bless[])->barney; EXPECT -Use of inherited AUTOLOAD for non-method main::fred() is deprecated at - line 5. +Use of inherited AUTOLOAD for non-method main::fred() is deprecated. This will be fatal in Perl 5.28 at - line 5. ######## # gv.c use utf8; @@ -56,7 +56,7 @@ sub OáÊ::AUTOLOAD { 1 } sub OáÊ::fáÆ {} use warnings 'deprecated' ; fáÆ() ; EXPECT -Use of inherited AUTOLOAD for non-method main::fáÆ() is deprecated at - line 7. +Use of inherited AUTOLOAD for non-method main::fáÆ() is deprecated. This will be fatal in Perl 5.28 at - line 7. ######## # gv.c $a = ${"#"}; @@ -65,8 +65,8 @@ no warnings 'deprecated' ; $a = ${"#"}; $a = ${"*"}; EXPECT -$# is no longer supported at - line 2. -$* is no longer supported at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. ######## # gv.c $a = ${#}; @@ -75,8 +75,8 @@ no warnings 'deprecated' ; $a = ${#}; $a = ${*}; EXPECT -$# is no longer supported at - line 2. -$* is no longer supported at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. ######## # gv.c $a = $#; @@ -93,12 +93,12 @@ $* = $a; $a = \$#; $a = \$*; EXPECT -$# is no longer supported at - line 2. -$* is no longer supported at - line 3. -$# is no longer supported at - line 4. -$* is no longer supported at - line 5. -$# is no longer supported at - line 6. -$* is no longer supported at - line 7. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 4. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 5. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 6. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 7. ######## # gv.c @a = @#; @@ -106,8 +106,8 @@ $* is no longer supported at - line 7. $a = $#; $a = $*; EXPECT -$# is no longer supported at - line 4. -$* is no longer supported at - line 5. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 4. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 5. ######## # gv.c $a = $#; @@ -115,8 +115,8 @@ $a = $*; @a = @#; @a = @*; EXPECT -$# is no longer supported at - line 2. -$* is no longer supported at - line 3. +$# is no longer supported. Its use will be fatal in Perl 5.30 at - line 2. +$* is no longer supported. Its use will be fatal in Perl 5.30 at - line 3. ######## # gv.c $a = ${^ENCODING}; @@ -124,7 +124,7 @@ $a = ${^E_NCODING}; ${^ENCODING} = 1; ${^E_NCODING} = 1; # We pretend this variable never existed. EXPECT -${^ENCODING} is no longer supported at - line 4. +${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28 at - line 4. ######## # gv.c use warnings 'syntax' ; diff --git a/t/lib/warnings/mg b/t/lib/warnings/mg index 5fe2a8807e..7fdefc26b3 100644 --- a/t/lib/warnings/mg +++ b/t/lib/warnings/mg @@ -3,7 +3,7 @@ No such signal: SIG%s $SIG{FRED} = sub {} - Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef + Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 SIG%s handler \"%s\" not defined. $SIG{"INT"} = "ok3"; kill "INT",$$; @@ -25,19 +25,19 @@ EXPECT # warnable code, warnings enabled via command line switch $/ = \0; EXPECT -Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef at - line 3. +Setting $/ to a reference to zero as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 at - line 3. ######## -w # warnable code, warnings enabled via command line switch $/ = \-1; EXPECT -Setting $/ to a reference to a negative integer as a form of slurp is deprecated, treating as undef at - line 3. +Setting $/ to a reference to a negative integer as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 at - line 3. ######## $/ = \-1; no warnings 'deprecated'; $/ = \-1; EXPECT -Setting $/ to a reference to a negative integer as a form of slurp is deprecated, treating as undef at - line 1. +Setting $/ to a reference to a negative integer as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28 at - line 1. ######## # mg.c use warnings 'signal' ; @@ -110,5 +110,5 @@ ${^ENCODING} = 42; ${^ENCODING} = undef; { local ${^ENCODING} = 37; } EXPECT -${^ENCODING} is no longer supported at - line 1. -${^ENCODING} is no longer supported at - line 4. +${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28 at - line 1. +${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28 at - line 4. diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 37ebbbed99..46885e22af 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -1772,13 +1772,13 @@ if (my $w2) { $a=1 } if ($a && (my $w3 = 1)) {$a = 2} EXPECT -Deprecated use of my() in false conditional at - line 2. -Deprecated use of my() in false conditional at - line 3. -Deprecated use of my() in false conditional at - line 4. -Deprecated use of my() in false conditional at - line 5. -Deprecated use of my() in false conditional at - line 6. -Deprecated use of my() in false conditional at - line 7. -Deprecated use of my() in false conditional at - line 8. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 2. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 3. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 4. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 5. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 6. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 7. +Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 8. ######## # op.c $[ = 1; diff --git a/t/lib/warnings/pp b/t/lib/warnings/pp index 3eef12a208..27629a7d29 100644 --- a/t/lib/warnings/pp +++ b/t/lib/warnings/pp @@ -21,7 +21,7 @@ Constant subroutine (anonymous) undefined $foo = sub () { 3 }; undef &$foo; - Use of strings with code points over 0xFF as arguments to 1's complement (~) operator is deprecated + Use of strings with code points over 0xFF as arguments to 1's complement (~) operator is deprecated. This will be a fatal error in Perl 5.28 Invalid negative number (%s) in chr @@ -138,8 +138,8 @@ $_ = ~ "\xff"; $_ = ~ "\x{100}"; EXPECT OPTION regex -Use of strings with code points over 0xFF as arguments to 1's complement \(~\) operator is deprecated at - line \d+. -Use of code point 0xFF+EFF is deprecated; the permissible max is 0x7F+ at - line \d+. +Use of strings with code points over 0xFF as arguments to 1's complement \(~\) operator is deprecated. This will be a fatal error in Perl 5.28 at - line \d+. +Use of code point 0xFF+EFF is deprecated; the permissible max is 0x7F+\. This will be fatal in Perl 5\.28 at - line \d+. ######## # NAME chr -1 use warnings 'utf8'; diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index b1451b1cd3..9c544e088b 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -771,8 +771,8 @@ no warnings qw(io deprecated); open FOO, "../harness"; open $foo, "../harness"; EXPECT -Opening dirhandle FOO also as a file at - line 5. -Opening dirhandle $foo also as a file at - line 6. +Opening dirhandle FOO also as a file. This will be a fatal error in Perl 5.28 at - line 5. +Opening dirhandle $foo also as a file. This will be a fatal error in Perl 5.28 at - line 6. ######## # pp_sys.c [pp_open] @@ -787,8 +787,8 @@ no warnings qw(io deprecated); open FOO, "../harness"; open $ï½ï½ï½, "../harness"; EXPECT -Opening dirhandle FOO also as a file at - line 8. -Opening dirhandle $ï½ï½ï½ also as a file at - line 9. +Opening dirhandle FOO also as a file. This will be a fatal error in Perl 5.28 at - line 8. +Opening dirhandle $ï½ï½ï½ also as a file. This will be a fatal error in Perl 5.28 at - line 9. ######## # pp_sys.c [pp_open_dir] use warnings; @@ -800,8 +800,8 @@ no warnings qw(io deprecated); opendir FOO, "."; opendir $foo, "."; EXPECT -Opening filehandle FOO also as a directory at - line 5. -Opening filehandle $foo also as a directory at - line 6. +Opening filehandle FOO also as a directory. This will be a fatal error in Perl 5.28 at - line 5. +Opening filehandle $foo also as a directory. This will be a fatal error in Perl 5.28 at - line 6. ######## # pp_sys.c [pp_open_dir] @@ -817,8 +817,8 @@ no warnings qw(io deprecated); opendir FOO, "."; opendir $ï½ï½ï½, "."; EXPECT -Opening filehandle FOO also as a directory at - line 9. -Opening filehandle $ï½ï½ï½ also as a directory at - line 10. +Opening filehandle FOO also as a directory. This will be a fatal error in Perl 5.28 at - line 9. +Opening filehandle $ï½ï½ï½ also as a directory. This will be a fatal error in Perl 5.28 at - line 10. ######## # pp_sys.c [pp_*dir] use Config ; @@ -958,7 +958,7 @@ sysread $fh, $buf, 10; no warnings 'deprecated'; sysread $fh, $buf, 10; EXPECT -sysread() is deprecated on :utf8 handles at - line 5. +sysread() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30 at - line 5. ######## # NAME syswrite() deprecated on :utf8 my $file = "syswwarn.tmp"; @@ -971,4 +971,4 @@ syswrite $fh, 'ABC'; close $fh; unlink $file; EXPECT -syswrite() is deprecated on :utf8 handles at - line 5. +syswrite() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30 at - line 5. diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp index 08cb27b00f..44ef5c3e4e 100644 --- a/t/lib/warnings/regcomp +++ b/t/lib/warnings/regcomp @@ -31,12 +31,12 @@ BEGIN { use warnings; $a = qr/\c,/; $a = qr/[\c,]/; -no warnings 'syntax'; +no warnings 'syntax', 'deprecated'; $a = qr/\c,/; $a = qr/[\c,]/; EXPECT -"\c," is more clearly written simply as "l" at - line 9. -"\c," is more clearly written simply as "l" at - line 10. +"\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 9. +"\c," is more clearly written simply as "l". This will be a fatal error in Perl 5.28 at - line 10. ######## **** PATCH TRUNCATED AT 2000 LINES -- 2015 NOT SHOWN **** -- Perl5 Master Repository
