In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8e79611597d95802d03ffff2bdfe4ca5ab24ea62?hp=d7e75038064881b413f76de9315a5acfb21472f0>

- Log -----------------------------------------------------------------
commit 8e79611597d95802d03ffff2bdfe4ca5ab24ea62
Author: Dagfinn Ilmari Mannsåker <[email protected]>
Date:   Tue Nov 21 21:12:12 2017 +0000

    Assigning non-zero to $[ will become fatal in 5.30
    
    As agreed at the Perl5 Core Hackathon.

-----------------------------------------------------------------------

Summary of changes:
 ext/arybase/arybase.pm  | 2 +-
 ext/arybase/arybase.xs  | 1 +
 pod/perldelta.pod       | 6 ++++++
 pod/perldeprecation.pod | 9 +++++++++
 pod/perldiag.pod        | 6 ++++--
 t/lib/feature/bundle    | 6 +++---
 t/lib/warnings/op       | 8 ++++----
 7 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/ext/arybase/arybase.pm b/ext/arybase/arybase.pm
index 74913f19cb..5e34e29e8d 100644
--- a/ext/arybase/arybase.pm
+++ b/ext/arybase/arybase.pm
@@ -1,6 +1,6 @@
 package arybase;
 
-our $VERSION = "0.14";
+our $VERSION = "0.15";
 
 require XSLoader;
 XSLoader::load(); # This returns true, which makes require happy.
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs
index bd1d1c789c..6c12d0515f 100644
--- a/ext/arybase/arybase.xs
+++ b/ext/arybase/arybase.xs
@@ -159,6 +159,7 @@ STATIC void ab_process_assignment(pTHX_ OP *left, OP 
*right) {
   if (base) {
     Perl_ck_warner_d(aTHX_
      packWARN(WARN_DEPRECATED), "Use of assignment to $[ is deprecated"
+                                ", and will be fatal in Perl 5.30"
     );
   }
  }
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index de2ba9c595..b280c77420 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -49,6 +49,12 @@ XXX For a release on a stable branch, this section aspires 
to be:
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
 
+=head2 Assignment to C<$[> will be fatal in Perl 5.30
+
+Assigning a non-zero value to L<C<$[>|perlvar/$[> has been deprecated
+since Perl 5.12, but was never given a deadline for removal.  This has
+now been scheduled for Perl 5.30.
+
 =head2 Module removals
 
 XXX Remove this section if not applicable.
diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod
index c123f315ad..eb6e0f98cc 100644
--- a/pod/perldeprecation.pod
+++ b/pod/perldeprecation.pod
@@ -81,6 +81,15 @@ 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 Assigning non-zero to C<< $[ >> will be fatal
+
+This variable (and the corresponding C<array_base> feature and
+L<arybase> module) allows changing the base for array and string
+indexing operations.
+
+Setting this to a non-zero value has been deprecated since Perl 5.12 and
+will become fatal in Perl 5.30.
+
 =head3 C<< File::Glob::glob() >> will disappear
 
 C<< File::Glob >> has a function called C<< glob >>, which just calls
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 7e6d87eee9..528fd40339 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -6971,10 +6971,12 @@ you can write it as C<push(@tied_array,())> to avoid 
this warning.
 (F) The "use" keyword is recognized and executed at compile time, and
 returns no useful value.  See L<perlmod>.
 
-=item Use of assignment to $[ is deprecated
+=item Use of assignment to $[ is deprecated, and will be fatal in 5.30
 
 (D deprecated) The C<$[> variable (index of the first element in an array)
-is deprecated.  See L<perlvar/"$[">.
+is deprecated since Perl 5.12, and setting it to a non-zero value will be
+fatal as of Perl 5.30.
+See L<perlvar/"$[">.
 
 =item Use of bare << to mean <<"" is forbidden
 
diff --git a/t/lib/feature/bundle b/t/lib/feature/bundle
index b9facc0bd6..5eacaff41b 100644
--- a/t/lib/feature/bundle
+++ b/t/lib/feature/bundle
@@ -92,7 +92,7 @@ print qw[a b c][2], "\n";
 use feature ":5.16";
 print qw[a b c][2], "\n";
 EXPECT
-Use of assignment to $[ is deprecated at - line 4.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 4.
 b
 b
 c
@@ -104,7 +104,7 @@ no feature; # resets to :default, thus turns array_base on
 $[ = 1;
 print qw[a b c][2], "\n";
 EXPECT
-Use of assignment to $[ is deprecated at - line 4.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 4.
 b
 ########
 # "no feature 'all"
@@ -114,7 +114,7 @@ no feature ':all'; # turns array_base (and everything else) 
off
 $[ = 1;
 print qw[a b c][2], "\n";
 EXPECT
-Use of assignment to $[ is deprecated at - line 2.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 2.
 Assigning non-zero to $[ is no longer possible at - line 5.
 b
 ########
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index bb684022dc..ead60adde1 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -1732,10 +1732,10 @@ no warnings 'deprecated';
 $[ = 3;
 ($[) = 3;
 EXPECT
-Use of assignment to $[ is deprecated at - line 2.
-Use of assignment to $[ is deprecated at - line 3.
-Use of assignment to $[ is deprecated at - line 5.
-Use of assignment to $[ is deprecated at - line 6.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 2.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 3.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 5.
+Use of assignment to $[ is deprecated, and will be fatal in Perl 5.30 at - 
line 6.
 ########
 # op.c
 use warnings 'void';

-- 
Perl5 Master Repository

Reply via email to