In perl.git, the branch blead-next has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3b0b633b5b0d9d3c864e7902ade8e9780a2c2161?hp=251510ca6165e1e8ddb095fdf93eb9d41b5ce565>

- Log -----------------------------------------------------------------
commit 3b0b633b5b0d9d3c864e7902ade8e9780a2c2161
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Sun Mar 26 15:26:22 2017 +0200

    Improve error message for bogus -MO=… arguments
    
    Commit 7a9b44b9 expanded the scope of the string eval that loads the
    B::* backend module, but didn't move the $@ check and croak to outside
    it.  Restore it and further improve the error message.
    
    Before:
    
        $ perl -MO=Concise=-debug -e1
        syntax error at (eval 2) line 18, near "="
        BEGIN failed--compilation aborted.
    
    After:
    
        $ ./perl -Ilib -MO=Concise=-debug -e1
        Loading compiler backend 'B::Concise=-debug' failed: syntax error at 
(eval 2) line 18, near "="
         at -e line 0.
        BEGIN failed--compilation aborted.

M       ext/B/B/Concise.pm
M       ext/B/O.pm

commit 4233eb36adee5e7614455ef45b6cc4de4eb0cc8e
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Tue May 30 11:44:17 2017 +0100

    Perldelta for deprecated attribute removal

M       pod/perldelta.pod

commit 0e36df61cf3aae3c13d667073118bf4b035e3df9
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Mon Jan 18 12:52:29 2016 +0000

    Remove deprecated no-op :locked attribute
    
    It's been a no-op since 5.10 and deprecated since 5.12.

M       dist/Attribute-Handlers/lib/Attribute/Handlers.pm
M       ext/attributes/attributes.pm
M       lib/B/Deparse.pm
M       pod/perldiag.pod
M       t/lib/warnings/toke
M       t/op/attrs.t
M       toke.c

commit 011841800b653ba819798261bf07afbdf2315351
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Mon Jan 18 12:42:55 2016 +0000

    Remove deprecated no-op :unique attribute
    
    It's been deprecated and a no-op since 5.10.

M       dist/Attribute-Handlers/lib/Attribute/Handlers.pm
M       ext/attributes/attributes.pm
M       pod/perldiag.pod
M       t/lib/warnings/toke
M       t/op/attrs.t
M       toke.c

commit 515a4048d8c5b7744f1acfa2c040101a7773a639
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Sat Nov 12 17:08:18 2016 +0100

    Remove deprecated comma-less format variable lists
    
    This has been issuing a deprecation warning since perl 5.000.

M       embed.fnc
M       embed.h
M       pod/perldelta.pod
M       proto.h
M       t/lib/warnings/toke
M       t/op/write.t
M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 dist/Attribute-Handlers/lib/Attribute/Handlers.pm |  8 +++--
 embed.fnc                                         |  1 -
 embed.h                                           |  1 -
 ext/B/B/Concise.pm                                |  4 +--
 ext/B/O.pm                                        | 10 +++---
 ext/attributes/attributes.pm                      | 19 +----------
 lib/B/Deparse.pm                                  |  3 +-
 pod/perldelta.pod                                 | 10 ++++++
 pod/perldiag.pod                                  | 14 --------
 proto.h                                           |  1 -
 t/lib/warnings/toke                               | 37 ---------------------
 t/op/attrs.t                                      |  7 ++--
 t/op/write.t                                      | 14 +-------
 toke.c                                            | 39 ++---------------------
 14 files changed, 29 insertions(+), 139 deletions(-)

diff --git a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm 
b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
index 7c049d48e6..67e4dc74ac 100644
--- a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
+++ b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
@@ -4,7 +4,7 @@ use Carp;
 use warnings;
 use strict;
 use vars qw($VERSION $AUTOLOAD);
-$VERSION = '0.99'; # remember to update version in POD!
+$VERSION = '1.00'; # remember to update version in POD!
 # $DB::single=1;
 
 my %symcache;
@@ -139,7 +139,9 @@ sub AUTOLOAD {
        croak "Attribute handler '$2' doesn't handle $1 attributes";
 }
 
-my $builtin = qr/lvalue|method|locked|unique|shared/;
+my $builtin = $] ge '5.027000'
+    ? qr/lvalue|method|shared/
+    : qr/lvalue|method|locked|shared|unique/;
 
 sub _gen_handler_AH_() {
        return sub {
@@ -270,7 +272,7 @@ Attribute::Handlers - Simpler definition of attribute 
handlers
 
 =head1 VERSION
 
-This document describes version 0.99 of Attribute::Handlers.
+This document describes version 1.00 of Attribute::Handlers.
 
 =head1 SYNOPSIS
 
diff --git a/embed.fnc b/embed.fnc
index 654dad9998..35b80d9de0 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2683,7 +2683,6 @@ so        |SV*    |new_constant   |NULLOK const char 
*s|STRLEN len \
                                |NN const char *key|STRLEN keylen|NN SV *sv \
                                |NULLOK SV *pv|NULLOK const char *type \
                                |STRLEN typelen
-s      |int    |deprecate_commaless_var_list
 s      |int    |ao             |int toketype
 s      |void|parse_ident|NN char **s|NN char **d \
                      |NN char * const e|int allow_package \
diff --git a/embed.h b/embed.h
index 5352f536f8..4400d870b2 100644
--- a/embed.h
+++ b/embed.h
@@ -1796,7 +1796,6 @@
 #define ao(a)                  S_ao(aTHX_ a)
 #define check_uni()            S_check_uni(aTHX)
 #define checkcomma(a,b,c)      S_checkcomma(aTHX_ a,b,c)
-#define deprecate_commaless_var_list() S_deprecate_commaless_var_list(aTHX)
 #define filter_gets(a,b)       S_filter_gets(aTHX_ a,b)
 #define find_in_my_stash(a,b)  S_find_in_my_stash(aTHX_ a,b)
 #define force_ident(a,b)       S_force_ident(aTHX_ a,b)
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 315e00a4b6..e5f1066281 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -14,7 +14,7 @@ use warnings; # uses #3 and #4, since warnings uses Carp
 
 use Exporter (); # use #5
 
-our $VERSION   = "0.999";
+our $VERSION   = "1.000";
 our @ISA       = qw(Exporter);
 our @EXPORT_OK = qw( set_style set_style_standard add_callback
                     concise_subref concise_cv concise_main
@@ -1103,7 +1103,7 @@ sub tree {
 # to update the corresponding magic number in the next line.
 # Remember, this needs to stay the last things in the module.
 
-my $cop_seq_mnum = 16;
+my $cop_seq_mnum = 12;
 $cop_seq_base = svref_2object(eval 'sub{0;}')->START->cop_seq + $cop_seq_mnum;
 
 1;
diff --git a/ext/B/O.pm b/ext/B/O.pm
index 2976a89420..94ee754293 100644
--- a/ext/B/O.pm
+++ b/ext/B/O.pm
@@ -1,6 +1,6 @@
 package O;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 use B qw(minus_c save_BEGINs);
 use Carp;
@@ -37,10 +37,6 @@ sub import {
            # "fragile kludge") so that its output still looks
            # nice. Thanks. --smcc
            use B::].$backend.q[ ();
-           if ($@) {
-               croak "use of backend $backend failed: $@";
-           }
-
 
            my $compilesub = &{"B::${backend}::compile"}(@options);
            if (ref($compilesub) ne "CODE") {
@@ -54,7 +50,9 @@ sub import {
            close STDERR if $veryquiet;
        }
     ];
-    die $@ if $@;
+    if ($@) {
+        croak "Loading compiler backend 'B::$backend' failed: $@";
+    }
 }
 
 1;
diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm
index 7eb8e30ed8..3a3a43ea5b 100644
--- a/ext/attributes/attributes.pm
+++ b/ext/attributes/attributes.pm
@@ -1,6 +1,6 @@
 package attributes;
 
-our $VERSION = 0.29;
+our $VERSION = 0.30;
 
 @EXPORT_OK = qw(get reftype);
 @EXPORT = ();
@@ -19,9 +19,6 @@ sub carp {
 }
 
 my %deprecated;
-$deprecated{CODE} = qr/\A-?(locked)\z/;
-$deprecated{ARRAY} = $deprecated{HASH} = $deprecated{SCALAR}
-    = qr/\A-?(unique)\z/;
 
 my %msg = (
     lvalue => 'lvalue attribute applied to already-defined subroutine',
@@ -256,12 +253,6 @@ C<sub foo($$) : prototype(@) {}> is indistinguishable from 
C<sub foo(@){}>.
 If illegalproto warnings are enabled, the prototype declared inside this
 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 will
-disappear in Perl 5.28, after which its use will be fatal.
-
 =item const
 
 This experimental attribute, introduced in Perl 5.22, only applies to
@@ -280,14 +271,6 @@ The following are the built-in attributes for variables:
 Indicates that the referenced variable can be shared across different threads
 when used in conjunction with the L<threads> and L<threads::shared> modules.
 
-=item unique
-
-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. It will disappear in 5.28, after which its
-use will be fatal.
-
 =back
 
 =head2 Available Subroutines
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 3166415b54..6c35a7275e 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -47,7 +47,7 @@ use B qw(class main_root main_start main_cv svref_2object 
opnumber perlstring
         MDEREF_SHIFT
     );
 
-$VERSION = '1.40';
+$VERSION = '1.41';
 use strict;
 use vars qw/$AUTOLOAD/;
 use warnings ();
@@ -1334,7 +1334,6 @@ Carp::confess("SPECIAL in deparse_sub") if 
$cv->isa("B::SPECIAL");
     }
     if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE|CVf_ANONCONST)) {
         push @attrs, "lvalue" if $cv->CvFLAGS & CVf_LVALUE;
-        push @attrs, "locked" if $cv->CvFLAGS & CVf_LOCKED;
         push @attrs, "method" if $cv->CvFLAGS & CVf_METHOD;
         push @attrs, "const"  if $cv->CvFLAGS & CVf_ANONCONST;
     }
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index d0c5bf6af5..6d4e1abc43 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -45,6 +45,16 @@ XXX For a release on a stable branch, this section aspires 
to be:
 
 [ List each incompatible change as a =head2 entry ]
 
+=head2 Comma-less variable lists in formats are no longer allowed
+
+Omitting the commas between variables passed to formats is no longer
+allowed.  This has been deprecated since perl 5.000.
+
+=head2 The C<:locked> and C<:unique> attributes have been removed
+
+These have been no-ops and deprecated since perl 5.12 and 5.10,
+respectively.
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 730010a882..5652b10b6b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -418,26 +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, 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 Perl 5.28.
-
 =item Attribute prototype(%s) discards earlier prototype attribute in same sub
 
 (W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for
 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, 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 Perl 5.28.
-
 =item av_reify called on tied array
 
 (S debugging) This indicates that something went wrong and Perl got I<very>
diff --git a/proto.h b/proto.h
index f1d6181b4b..8f64cf614f 100644
--- a/proto.h
+++ b/proto.h
@@ -5651,7 +5651,6 @@ STATIC void       S_check_uni(pTHX);
 STATIC void    S_checkcomma(pTHX_ const char *s, const char *name, const char 
*what);
 #define PERL_ARGS_ASSERT_CHECKCOMMA    \
        assert(s); assert(name); assert(what)
-STATIC int     S_deprecate_commaless_var_list(pTHX);
 STATIC char *  S_filter_gets(pTHX_ SV *sv, STRLEN append)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_FILTER_GETS   \
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index fc51d9f09f..49fa97ea8e 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -4,8 +4,6 @@ toke.c  AOK
 
  
                $a = <<;
-               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 
        use warnings 'syntax' ;
@@ -125,21 +123,6 @@ toke.c     AOK
         *foo *foo
 
 __END__
-# toke.c 
-format STDOUT =
-@<<<  @|||  @>>>  @>>>
-$a    $b    "abc" 'def'
-.
-no warnings 'deprecated' ;
-format STDOUT =
-@<<<  @|||  @>>>  @>>>
-$a    $b    "abc" 'def'
-.
-EXPECT
-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 = <<;
 
@@ -1267,26 +1250,6 @@ EXPECT
 !=~ should be !~ at - line 9.
 ########
 # toke.c
-our $foo :unique;
-sub pam :locked;
-sub glipp :locked {
-}
-sub whack_eth ($) : locked {
-}
-no warnings 'deprecated';
-our $bar :unique;
-sub zapeth :locked;
-sub ker_plop :locked {
-}
-sub swa_a_p ($) : locked {
-}
-EXPECT
-Attribute "unique" is deprecated, and will disappear in Perl 5.28 at - line 2.
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 3.
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 4.
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 6.
-########
-# toke.c
 use warnings "syntax";
 sub proto_after_array(@$);
 sub proto_after_arref(\@$);
diff --git a/t/op/attrs.t b/t/op/attrs.t
index c3cf439f1f..2514270eda 100644
--- a/t/op/attrs.t
+++ b/t/op/attrs.t
@@ -160,20 +160,19 @@ like $@, qr/Can't declare scalar dereference in "my"/;
 
 my @code = qw(lvalue method);
 my @other = qw(shared);
-my @deprecated = qw(locked unique);
+my @deprecated = qw();
+my @invalid = qw(unique locked);
 my %valid;
 $valid{CODE} = {map {$_ => 1} @code};
 $valid{SCALAR} = {map {$_ => 1} @other};
 $valid{ARRAY} = $valid{HASH} = $valid{SCALAR};
 my %deprecated;
-$deprecated{CODE} = { locked => 1 };
-$deprecated{ARRAY} = $deprecated{HASH} = $deprecated{SCALAR} = { unique => 1 };
 
 our ($scalar, @array, %hash);
 foreach my $value (\&foo, \$scalar, \@array, \%hash) {
     my $type = ref $value;
     foreach my $negate ('', '-') {
-       foreach my $attr (@code, @other, @deprecated) {
+       foreach my $attr (@code, @other, @deprecated, @invalid) {
            my $attribute = $negate . $attr;
            eval "use attributes __PACKAGE__, \$value, '$attribute'";
            if ($deprecated{$type}{$attr}) {
diff --git a/t/op/write.t b/t/op/write.t
index d528a8e3f1..645bf699f5 100644
--- a/t/op/write.t
+++ b/t/op/write.t
@@ -98,7 +98,7 @@ for my $tref ( @NumTests ){
 my $bas_tests = 21;
 
 # number of tests in section 3
-my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 6 + 2 + 3 + 96 + 11 + 15;
+my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 6 + 2 + 3 + 96 + 11 + 14;
 
 # number of tests in section 4
 my $hmb_tests = 37;
@@ -2018,18 +2018,6 @@ a    x
 EXPECT
              { stderr => 1 }, '#123538 crash in FF_MORE');
 
-# this used to assert fail
-fresh_perl_like(<<'EOP',
-format STDOUT =
-@
-0"$x"
-.
-print "got here\n";
-EOP
-    qr/Use of comma-less variable list is deprecated.*got here/s,
-    { stderr => 1 },
-    '#128255 Assert fail in S_sublex_done');
-
 {
     $^A = "";
     my $a = *globcopy;
diff --git a/toke.c b/toke.c
index ee18153e34..ce6fe22162 100644
--- a/toke.c
+++ b/toke.c
@@ -464,13 +464,6 @@ S_printbuf(pTHX_ const char *const fmt, const char *const 
s)
 
 #endif
 
-static int
-S_deprecate_commaless_var_list(pTHX) {
-    PL_expect = XTERM;
-    deprecate_fatal_in("5.28", "Use of comma-less variable list is 
deprecated");
-    return REPORT(','); /* grandfather non-comma-format format */
-}
-
 /*
  * S_ao
  *
@@ -5897,27 +5890,12 @@ Perl_yylex(pTHX)
                    PL_lex_stuff = NULL;
                }
                else {
-                   if (len == 6 && strnEQ(SvPVX(sv), "unique", len)) {
-                       sv_free(sv);
-                       if (PL_in_my == KEY_our) {
-                            deprecate_disappears_in("5.28",
-                                "Attribute \"unique\" is deprecated");
-                       }
-                       else
-                           Perl_croak(aTHX_ "The 'unique' attribute may only 
be applied to 'our' variables");
-                   }
-
                    /* NOTE: any CV attrs applied here need to be part of
                       the CVf_BUILTIN_ATTRS define in cv.h! */
-                   else if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), 
"lvalue", len)) {
+                   if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), "lvalue", 
len)) {
                        sv_free(sv);
                        CvLVALUE_on(PL_compcv);
                    }
-                   else if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), 
"locked", len)) {
-                       sv_free(sv);
-                        deprecate_disappears_in("5.28",
-                            "Attribute \"locked\" is deprecated");
-                   }
                    else if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), 
"method", len)) {
                        sv_free(sv);
                        CvMETHOD_on(PL_compcv);
@@ -6563,12 +6541,7 @@ Perl_yylex(pTHX)
     case '$':
        CLINE;
 
-       if (PL_expect == XOPERATOR) {
-           if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
-               return deprecate_commaless_var_list();
-           }
-       }
-       else if (PL_expect == XPOSTDEREF) {
+        if (PL_expect == XPOSTDEREF) {
            if (s[1] == '#') {
                s++;
                POSTDEREF(DOLSHARP);
@@ -6858,10 +6831,6 @@ Perl_yylex(pTHX)
        TERM(THING);
 
     case '\'':
-       if (   PL_expect == XOPERATOR
-           && (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack))
-               return deprecate_commaless_var_list();
-
        s = scan_str(s,FALSE,FALSE,FALSE,NULL);
        if (!s)
            missingterm(NULL);
@@ -6874,10 +6843,6 @@ Perl_yylex(pTHX)
        TERM(sublex_start());
 
     case '"':
-       if (   PL_expect == XOPERATOR
-           && (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack))
-               return deprecate_commaless_var_list();
-
        s = scan_str(s,FALSE,FALSE,FALSE,NULL);
        DEBUG_T( {
            if (s)

--
Perl5 Master Repository

Reply via email to