diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-10-18 01:01:11 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2018-09-26 13:00:19 +0100 |
commit | c22e17d0af032be4fb2cd747c9bb7a7622e3ba64 (patch) | |
tree | 9781a06bc165ea4ee0c1148a07e0d551ada81a4d /pod | |
parent | b48c08b9845692aded457ece78aa7d05316e9be3 (diff) | |
download | perl-c22e17d0af032be4fb2cd747c9bb7a7622e3ba64.tar.gz |
Remove support for setting $[ to a non-zero value
This removes arybase and all its surrounding machinery.
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perldelta.pod | 6 | ||||
-rw-r--r-- | pod/perldeprecation.pod | 6 | ||||
-rw-r--r-- | pod/perldiag.pod | 25 | ||||
-rw-r--r-- | pod/perlvar.pod | 11 |
4 files changed, 15 insertions, 33 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 36178a1c6d..221d0df2f3 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -45,6 +45,12 @@ XXX For a release on a stable branch, this section aspires to be: [ List each incompatible change as a =head2 entry ] +=head2 Assigning non-zero to C<$[> is fatal + +Setting L<< C<$[>|perlvar/$[ >> to a non-zero value has been deprecated since +Perl 5.12 and now throws a fatal error. +See L<<< perldeprecation/Assigning non-zero to C<< $[ >> is fatal >>>. + =head1 Deprecations XXX Any deprecated features, syntax, modules etc. should be listed here. diff --git a/pod/perldeprecation.pod b/pod/perldeprecation.pod index 938d67832d..f3b530881e 100644 --- a/pod/perldeprecation.pod +++ b/pod/perldeprecation.pod @@ -136,14 +136,14 @@ error in Perl 5.30. To specify how numbers are formatted when printed, one is advised to use C<< printf >> or C<< sprintf >> instead. -=head3 Assigning non-zero to C<< $[ >> will be fatal +=head3 Assigning non-zero to C<< $[ >> is fatal This variable (and the corresponding C<array_base> feature and -L<arybase> module) allows changing the base for array and string +L<arybase> module) allowed 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. +throws a fatal error as of Perl 5.30. =head3 C<< File::Glob::glob() >> will disappear diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 2c1fe74a87..17b96caad1 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -264,7 +264,8 @@ an array, or an array to a hash; the two types must match. =item Assigning non-zero to $[ is no longer possible -(F) When the "array_base" feature is disabled (e.g., under C<use v5.16;>) +(F) When the "array_base" feature is disabled +(e.g., and under C<use v5.16;>, and as of Perl 5.30) the special variable C<$[>, which is deprecated, is now a fixed zero value. =item Assignment to both a list and a scalar @@ -6109,21 +6110,6 @@ a dirhandle. Check your control flow. (W unopened) You tried to use the tell() function on a filehandle that was either never opened or has since been closed. -=item That use of $[ is unsupported - -(F) Assignment to C<$[> is now strictly circumscribed, and interpreted -as a compiler directive. You may say only one of - - $[ = 0; - $[ = 1; - ... - local $[ = 0; - local $[ = 1; - ... - -This is to prevent the problem of one module changing the array base out -from under another module inadvertently. See L<perlvar/$[> and L<arybase>. - =item The alpha_assertions feature is experimental (S experimental::alpha_assertions) This feature is experimental @@ -7188,13 +7174,6 @@ 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, and will be fatal in 5.30 - -(D deprecated) The C<$[> variable (index of the first element in an array) -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 (F) You are now required to use the explicitly quoted form if you wish diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 114a7e0d12..5faea28062 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -2371,19 +2371,16 @@ scopes in the same file, unlike other compile-time directives (such as L<strict>). Using local() on it would bind its value strictly to a lexical block. Now it is always lexically scoped. -As of Perl v5.16.0, it is implemented by the L<arybase> module. See -L<arybase> for more details on its behaviour. +As of Perl v5.16.0, it is implemented by the L<arybase> module. -Under C<use v5.16>, or C<no feature "array_base">, C<$[> no longer has any -effect, and always contains 0. Assigning 0 to it is permitted, but any -other value will produce an error. +As of Perl v5.30.0, or under C<use v5.16>, or C<no feature "array_base">, +C<$[> no longer has any effect, and always contains 0. +Assigning 0 to it is permitted, but any other value will produce an error. Mnemonic: [ begins subscripts. Deprecated in Perl v5.12.0. -Assigning a non-zero value be fatal in Perl v5.30.0. - =back =cut |