In perl.git, the branch abigail/deprecation has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/d30393aaade31b605724846a30a10dd1e96cd181?hp=4d95c3f0c851ce04e7ed95b997e31d4653ddc41c>

- Log -----------------------------------------------------------------
commit d30393aaade31b605724846a30a10dd1e96cd181
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 84b32f52b10f9912b40ef378cd0b01f4aff80630
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 c59d30d517291f957a08800312d5716b93b9f193
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
-----------------------------------------------------------------------

Summary of changes:
 handy.h                 |  2 --
 pod/perldeprecation.pod | 34 ++++++++++++++++++++++++++++++++++
 pod/perldiag.pod        |  8 ++++++--
 pod/perlfunc.pod        |  3 ++-
 pp_ctl.c                |  2 +-
 t/lib/warnings/toke     |  8 ++++----
 toke.c                  |  2 +-
 7 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/handy.h b/handy.h
index 8a0ad0a..283a689 100644
--- a/handy.h
+++ b/handy.h
@@ -2201,8 +2201,6 @@ void Perl_mem_log_del_sv(const SV *sv, const char 
*filename, const int linenumbe
    shortcut macro defined without -DPERL_CORE. Neither codesearch.google.com 
nor
    CPAN::Unpack show any users outside the core.  */
 #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)
diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod
index cb41c2a..1387934 100644
--- a/pod/perldeprecation.pod
+++ b/pod/perldeprecation.pod
@@ -122,6 +122,14 @@ 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
@@ -143,6 +151,32 @@ will be a fatal error in Perl 5.28.
 
 You should be using two different symbols instead.
 
+
+
+=head3 Use of "goto" to jump into a construct.
+
+Use of C<goto> to jump from an outer scope into an inner scope was
+deprecated in Perl 5.12, and it will be a fatal error in Perl 5.28.
+
+This means, you should not write constructs like:
+
+   $x = 1;
+   while ($x) {
+       $foo = 1;
+     LABEL:
+       $bar = 1;
+   }
+   goto LABEL;
+
+This will jump into the block belonging to C<while>. Not only has 
+been this a cause of subtle bugs in the past, it's generally
+considered to lead to hard to understand programs.
+
+This means, soon it's not possible anymore to write
+L<Duff's device|https://www.lysator.liu.se/c/duffs-device.html> in pure Perl.
+But you never wanted to do this anyway.
+
+
 =head3 ${^ENCODING} is no longer supported.
 
 The special variable C<${^ENCODING}> was used to implement
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index ac55503..d581a63 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -6922,11 +6922,13 @@ than 32-bit ones.
 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
+=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;
@@ -6977,11 +6979,13 @@ middle of an iteration causes Perl to see a freed value.
 operator.  Since C<split> always tries to match the pattern
 repeatedly, the C</g> has no effect.
 
-=item Use of "goto" to jump into a construct is deprecated
+=item Use of "goto" to jump into a construct is deprecated. Its use will be 
fatal in Perl 5.28
 
 (D deprecated) Using C<goto> to jump from an outer scope into an inner
 scope is deprecated and should be avoided.
 
+This was deprecated in Perl 5.12, and will be a fatal error in Perl 5.28.
+
 =item Use of inherited AUTOLOAD for non-method %s() is deprecated
 
 (D deprecated) As an (ahem) accidental feature, C<AUTOLOAD>
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 18bb465..d8cf052 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3285,7 +3285,8 @@ Also, unlike most named operators, this has the same 
precedence as
 assignment.
 
 Use of C<goto LABEL> or C<goto EXPR> to jump into a construct is
-deprecated and will issue a warning.  Even then, it may not be used to
+deprecated and will issue a warning; it will be a fatal error in
+Perl 5.28. Even then, it may not be used to
 go into any construct that requires initialization, such as a
 subroutine or a C<foreach> loop.  It also can't be used to go into a
 construct that is optimized away.
diff --git a/pp_ctl.c b/pp_ctl.c
index 89a7521..b86ebde 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3011,7 +3011,7 @@ PP(pp_goto)
        if (*enterops && enterops[1]) {
            I32 i = enterops[1]->op_type == OP_ENTER && in_block ? 2 : 1;
            if (enterops[i])
-               deprecate("\"goto\" to jump into a construct");
+               deprecate_fatal_in("5.28", "Use of \"goto\" to jump into a 
construct is deprecated. Its use will be fatal in Perl 5.28");
        }
 
        /* pop unwanted frames */
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index f34680e..4102909 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -4,7 +4,7 @@ toke.c  AOK
 
  
                $a = <<;
-               Use of comma-less variable list is deprecated 
+               Use of comma-less variable list is deprecated. Its use will be 
fatal in Perl 5.28
                (called 3 times via depcom)
 
      \1 better written as $1 
@@ -136,9 +136,9 @@ format STDOUT =
 $a    $b    "abc" 'def'
 .
 EXPECT
-Use of comma-less variable list is deprecated at - line 4.
-Use of comma-less variable list is deprecated at - line 4.
-Use of comma-less variable list is deprecated at - line 4.
+Use of comma-less variable list is deprecated. Its use will be fatal in Perl 
5.28 at - line 4.
+Use of comma-less variable list is deprecated. Its use will be fatal in Perl 
5.28 at - line 4.
+Use of comma-less variable list is deprecated. Its use will be fatal in Perl 
5.28 at - line 4.
 ########
 # toke.c
 $a = <<;
diff --git a/toke.c b/toke.c
index aadf541..b5f8685 100644
--- a/toke.c
+++ b/toke.c
@@ -467,7 +467,7 @@ S_printbuf(pTHX_ const char *const fmt, const char *const s)
 static int
 S_deprecate_commaless_var_list(pTHX) {
     PL_expect = XTERM;
-    deprecate("comma-less variable list");
+    deprecate_fatal_in("5.28", "Use of comma-less variable list is 
deprecated");
     return REPORT(','); /* grandfather non-comma-format format */
 }
 

--
Perl5 Master Repository

Reply via email to