Skip to content

Commit

Permalink
Merge 75336a5 into 7ab87c6
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Oct 24, 2021
2 parents 7ab87c6 + 75336a5 commit c08b85b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
4 changes: 2 additions & 2 deletions feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

#define FEATURE_INDIRECT_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_535 \
CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527 \
|| (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
FEATURE_IS_ENABLED_MASK(FEATURE_INDIRECT_BIT)) \
)
Expand Down Expand Up @@ -178,7 +178,7 @@

#define FEATURE_MULTIDIMENSIONAL_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_535 \
CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527 \
|| (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
FEATURE_IS_ENABLED_MASK(FEATURE_MULTIDIMENSIONAL_BIT)) \
)
Expand Down
9 changes: 4 additions & 5 deletions lib/feature.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package feature;

our $VERSION = '1.68';
our $VERSION = '1.69';

our %feature = (
fc => 'feature_fc',
Expand Down Expand Up @@ -35,7 +35,7 @@ our %feature_bundle = (
"5.15" => [qw(bareword_filehandles current_sub evalbytes fc indirect multidimensional say state switch unicode_eval unicode_strings)],
"5.23" => [qw(bareword_filehandles current_sub evalbytes fc indirect multidimensional postderef_qq say state switch unicode_eval unicode_strings)],
"5.27" => [qw(bareword_filehandles bitwise current_sub evalbytes fc indirect multidimensional postderef_qq say state switch unicode_eval unicode_strings)],
"5.35" => [qw(bareword_filehandles bitwise current_sub evalbytes fc indirect multidimensional postderef_qq say state unicode_eval unicode_strings)],
"5.35" => [qw(bareword_filehandles bitwise current_sub evalbytes fc postderef_qq say state unicode_eval unicode_strings)],
"all" => [qw(bareword_filehandles bitwise current_sub declared_refs defer evalbytes fc indirect isa multidimensional postderef_qq refaliasing say signatures state switch try unicode_eval unicode_strings)],
"default" => [qw(bareword_filehandles indirect multidimensional)],
);
Expand Down Expand Up @@ -511,9 +511,8 @@ The following feature bundles are available:
unicode_strings
:5.36 bareword_filehandles bitwise current_sub
evalbytes fc indirect multidimensional
postderef_qq say state unicode_eval
unicode_strings
evalbytes fc postderef_qq say state
unicode_eval unicode_strings
The C<:default> bundle represents the feature set that is enabled before
any C<use feature> or C<no feature> declaration.
Expand Down
9 changes: 9 additions & 0 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ here, but most should go in the L</Performance Enhancements> section.

[ List each enhancement as a =head2 entry ]

=head2 C<use v5.36> now disables bareword_filehandles and indirect

The :5.36 bundle, loaded by C<use v5.36>, no longer includes
C<bareword_filehandles> or C<indirect>, meaning that these discouraged forms of
syntax will not be allowed within the scope of that version declaration.

This will also affect C<use v5.35.x>, even on subversions of v5.35 prior to
this one.

=head1 Security

XXX Any security-related notices go here. In particular, any security
Expand Down
6 changes: 5 additions & 1 deletion pod/perlfunc.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4903,7 +4903,11 @@ An older style is to use a bareword as the filehandle, as

Then you can use C<FH> as the filehandle, in C<< close FH >> and C<<
<FH> >> and so on. Note that it's a global variable, so this form is
not recommended when dealing with filehandles other than Perl's built-in ones (e.g. STDOUT and STDIN).
not recommended when dealing with filehandles other than Perl's built-in ones
(e.g. STDOUT and STDIN). In fact, using a bareword for the filehandle is
I<illegal> when the C<bareword_filehandles> feature has been disabled. This
feature is disabled by default when in the scope of C<use v5.36.0> or later.


=back

Expand Down
7 changes: 5 additions & 2 deletions regen/feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ BEGIN
use constant V5_15 => sort ( +V5_11, qw{unicode_eval evalbytes current_sub fc} );
use constant V5_23 => sort ( +V5_15, qw{postderef_qq} );
use constant V5_27 => sort ( +V5_23, qw{bitwise} );
use constant V5_35 => sort ( grep {; $_ ne 'switch' } +V5_27);

use constant V5_35 => sort grep {; $_ ne 'switch'
&& $_ ne 'indirect'
&& $_ ne 'multidimensional' } +V5_27;

my %feature_bundle = (
all => [ sort keys %feature ],
Expand Down Expand Up @@ -482,7 +485,7 @@ sub longest {
__END__
package feature;
our $VERSION = '1.68';
our $VERSION = '1.69';
FEATURES
Expand Down

0 comments on commit c08b85b

Please sign in to comment.