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

<http://perl5.git.perl.org/perl.git/commitdiff/d51413d70eeb05874e9a27c27b3208d163cdb007?hp=036a50fb04243a9659d226ce15c660997b063915>

- Log -----------------------------------------------------------------
commit d51413d70eeb05874e9a27c27b3208d163cdb007
Author: Abigail <[email protected]>
Date:   Mon Jan 16 11:48:08 2017 +0100

    Revert "Remove the deprecate() macro from handy.h."
    
    This reverts commit d30393aaade31b605724846a30a10dd1e96cd181.
    
    Since we reverted 84b32f52b10f9912b40ef378cd0b01f4aff80630, we have to
    revert this one as well, as a removed a macro which is used by said
    commit.

M       handy.h

commit cf1cae21be92ea7fd147a48cb50b93242db5783b
Author: Abigail <[email protected]>
Date:   Mon Jan 16 11:44:30 2017 +0100

    Revert "Jumping into constructs will be fatal in 5.28."
    
    This reverts commit 84b32f52b10f9912b40ef378cd0b01f4aff80630.
    
    There seems to be an objection to having this deprecated. This
    requires more debate.

M       pod/perldeprecation.pod
M       pod/perldiag.pod
M       pod/perlfunc.pod
M       pp_ctl.c
-----------------------------------------------------------------------

Summary of changes:
 handy.h                 |  2 ++
 pod/perldeprecation.pod | 26 --------------------------
 pod/perldiag.pod        |  4 ++--
 pod/perlfunc.pod        |  3 +--
 pp_ctl.c                |  2 +-
 5 files changed, 6 insertions(+), 31 deletions(-)

diff --git a/handy.h b/handy.h
index 283a68974b..8a0ad0ac2d 100644
--- a/handy.h
+++ b/handy.h
@@ -2201,6 +2201,8 @@ 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 bb69f7f1f9..d74a4feaf6 100644
--- a/pod/perldeprecation.pod
+++ b/pod/perldeprecation.pod
@@ -271,32 +271,6 @@ 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 d2e8297b51..ad92c8a889 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -7014,12 +7014,12 @@ 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. Its use will be 
fatal in Perl 5.28
+=item Use of "goto" to jump into a construct is deprecated
 
 (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.
+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
 
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index d8cf052aa4..18bb4654e1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3285,8 +3285,7 @@ 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; it will be a fatal error in
-Perl 5.28. Even then, it may not be used to
+deprecated and will issue a warning.  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 b86ebde544..89a7521f60 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_fatal_in("5.28", "Use of \"goto\" to jump into a 
construct is deprecated. Its use will be fatal in Perl 5.28");
+               deprecate("\"goto\" to jump into a construct");
        }
 
        /* pop unwanted frames */

--
Perl5 Master Repository

Reply via email to