In perl.git, the branch abigail/deprecation has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a6f03fd6ee02ef1cd2999f4cc9bab3047d4dbfe7?hp=7f576527b64197ef8db213b09c0c19c18b104242>
discards 7f576527b64197ef8db213b09c0c19c18b104242 (commit) discards df699a2e01831d0a39d95275c4490c1e6f4ab043 (commit) discards 102f1566ae3179210c18c496975364effd65758b (commit) discards 2476334afc51c4a3f4e80ec6bee812e73cedfc78 (commit) discards 949b9d0ed63f71dc78f29409c3fe8a4c7f569e3f (commit) discards 326f017ee5e3bc76d19d8edbe62ccef1f8a7c884 (commit) discards b18037451ab5d9c28846c9b9e20cdfe18577619c (commit) discards 7419ef42afb53fc5db745a116010d7d1325f64fa (commit) discards b439273356daf6f4d1324e3d570fe4f803284efa (commit) discards ad520e20c958b047a0b9358db949ea654a5c597a (commit) discards 1290db03c0d1eaf58919a620b00531e502262a43 (commit) discards 2820dd91910f553dd43a73e9804d9f5213cad9cb (commit) discards a9cc9addf6d522d6d8435b2bf2ebe9b2d0e36cec (commit) discards c3656834eee6a619e93dcdde9f12264c822d0fcf (commit) discards 98ed664135674637d081e73c193f2c8e5e289890 (commit) discards 518818ef951edb69f55bf0b099a3a6a137fff8e1 (commit) discards 8f6424911d4735543fe22f6e1d384a1345c558aa (commit) discards 646d846cc7ecb7655c9b0caabc752e31f16aa415 (commit) discards 92961fd9d2a8734f95412c203c8527f4f3494393 (commit) discards d1721ee5de2bde312f93a61a03f4ab807b170dbc (commit) discards 73288ec07c1967d8a817c3f1749400b60d7d5c60 (commit) discards 30df54161ba5b249dff36ac7a00fd16f94a61971 (commit) discards 4be484e44c755fecd122432856527c16dea4e607 (commit) discards 712dbb30586fcc29b47289fc7ad932c80332798c (commit) discards fb35ab4954fed3d180d94c4a555640406e90f857 (commit) discards e095d3877fe8b131b6ad0e48ee2eacae66de27ab (commit) discards 27dc68f9d2bdc06b09a5b7b161f368a0eae7dc89 (commit) discards 633a0bc8355b4cbc4e408d2058194813b88330d7 (commit) discards 476ee9f50595cb1072de2c240c9e5cce485778ba (commit) discards 53961df69d740a4b17661163353cd8ed01a42fd7 (commit) discards c678a5c2e5d4df527cd1b85faa0698a580e335e8 (commit) discards 932fab3d80bf39b4e6f1638c385e925ca05c4379 (commit) discards a77ee6ad965a872824f6fb20c2cdb24847f75ac4 (commit) discards 13f074b09c5267d0df69c951f504979e5573af1e (commit) discards c8db0cae4c27950a4bf37d2417f1c5fa4f5e35be (commit) discards 3dc68c0bb8e5fbd81da6b416938c2d9297f4cb69 (commit) discards b9e2a3484152f4fceee8731e0556cb4159713bb1 (commit) discards ec19e9626e764ba25c4b1d28c11d7e24b1d36184 (commit) discards ae0371a8468921a97f56e32636efa6baaabb2093 (commit) discards 8bb44853ce6b142ec4e7e40c651f6414918ba87b (commit) discards 3d118fb602288940e9e0adcabe3658c3fcd3ff8f (commit) discards c12ca7c400a83848b3763861e2c40fe791fe8c20 (commit) discards 44a3be09f48e0c0552c42f70febafd41257a021a (commit) discards 7f34c3fc3dbbc0a2c1a1eb7642151479215a2a94 (commit) discards 309f9cf3248f1277bde0ba508c54ede7eb818573 (commit) discards ff7c6fd1662da69a8e3f5652ae7400eb6d8e248d (commit) - Log ----------------------------------------------------------------- commit a6f03fd6ee02ef1cd2999f4cc9bab3047d4dbfe7 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 36d972e61663b6e6d47453a41110beed5d0998df 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 aa023103ab909ba7de17d66784d5d4107288f04f 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 90e38872e80df4832a991d7ba8a965cb1fbd591a 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 dacc4228a825079f62b6e4bfe2272544f6d5733a 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 0523d57a2e659de38a84b2e086d0e58d2d5cc267 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 bf9225bcb5552bb59c5e699dacb08656a8c0d73d 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 816240d28d73813be8961dcd5466d0ba6b9c44be 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 f194966fce37366d1cf08860cd734051c98bc9e3 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 5447042d5ce6d78a2a28c6226b132fbfc1592eba 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 f7953c4f0eb9c8145ade4ea3d4a8dc9a0caa3127 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 acb47a8a6dc1f36691c88d4c5449100bf44b42ab 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 de37707bb9bac8303af161c6cb88af206aba3792 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 951d5fbd578b40aab0661735eb647d2287f6311e 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 c67fcce8d7fb243027cc22e8a2740c96fd858805 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: pod/perldeprecation.pod | 10 ++++++++++ pod/perldiag.pod | 4 ++-- t/lib/warnings/regcomp | 12 ++++++------ toke.c | 3 +-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod index 8986396..d68804f 100644 --- a/pod/perldeprecation.pod +++ b/pod/perldeprecation.pod @@ -63,6 +63,16 @@ You are recommended to change your code to set C<$/> to C<undef> explicitly if you wish to slurp the file. + +=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 diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 01b6e84..27a0dcf 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -6439,8 +6439,8 @@ C<S<use charnames>>. =item Unknown charname '' is deprecated (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 diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp index 08cb27b..2b084c5 100644 --- a/t/lib/warnings/regcomp +++ b/t/lib/warnings/regcomp @@ -93,11 +93,11 @@ no warnings 'deprecated'; qr/[\N{}]/; qr/\N{}/; EXPECT -Unknown charname '' is deprecated at - line 2. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 2. Ignoring zero length \N{} in character class in regex; marked by <-- HERE in m/[\N{} <-- HERE ]/ at - line 2. -Unknown charname '' is deprecated at - line 3. -Unknown charname '' is deprecated at - line 5. -Unknown charname '' is deprecated at - line 6. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 3. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 6. ######## # NAME [perl #123417] # OPTION fatal @@ -106,7 +106,7 @@ no warnings 'experimental::re_strict'; use re 'strict'; qr/[\N{}]/; EXPECT -Unknown charname '' is deprecated at - line 5. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. Zero length \N{} in regex; marked by <-- HERE in m/[\N{} <-- HERE ]/ at - line 5. ######## # NAME [perl #123417] @@ -116,5 +116,5 @@ no warnings 'experimental::re_strict'; use re 'strict'; qr/\N{}/; EXPECT -Unknown charname '' is deprecated at - line 5. +Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28 at - line 5. Zero length \N{} in regex; marked by <-- HERE in m/\N{} <-- HERE / at - line 5. diff --git a/toke.c b/toke.c index 9160407..7fa242e 100644 --- a/toke.c +++ b/toke.c @@ -2537,8 +2537,7 @@ S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e) PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME; if (!SvCUR(res)) { - Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "Unknown charname '' is deprecated"); + deprecate_fatal_in("5.28", "Unknown charname '' is deprecated"); return res; } -- Perl5 Master Repository
