Skip to content

Commit

Permalink
Add the fc keyword in regen/feature.pl
Browse files Browse the repository at this point in the history
It doesn't do anything yet.
  • Loading branch information
Hugmeir authored and Karl Williamson committed Jan 29, 2012
1 parent b36bf33 commit 2a4315f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
7 changes: 7 additions & 0 deletions feature.h
Expand Up @@ -27,6 +27,13 @@
/* The longest string we pass in. */
#define MAX_FEATURE_LEN (sizeof("evalbytes")-1)

#define FEATURE_FC_IS_ENABLED \
( \
CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \
|| (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
FEATURE_IS_ENABLED("fc")) \
)

#define FEATURE_SAY_IS_ENABLED \
( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
Expand Down
16 changes: 13 additions & 3 deletions lib/feature.pm
Expand Up @@ -5,9 +5,10 @@

package feature;

our $VERSION = '1.25';
our $VERSION = '1.26';

our %feature = (
fc => 'feature_fc',
say => 'feature_say',
state => 'feature_state',
switch => 'feature_switch',
Expand All @@ -21,7 +22,7 @@ our %feature = (
our %feature_bundle = (
"5.10" => [qw(array_base say state switch)],
"5.11" => [qw(array_base say state switch unicode_strings)],
"5.15" => [qw(current_sub evalbytes say state switch unicode_eval unicode_strings)],
"5.15" => [qw(current_sub evalbytes fc say state switch unicode_eval unicode_strings)],
"default" => [qw(array_base)],
);

Expand Down Expand Up @@ -211,6 +212,15 @@ This feature is available under this name starting with Perl 5.16. In
previous versions, it was simply on all the time, and this pragma knew
nothing about it.
=head2 The 'fc' feature
C<use feature 'fc'> tells the compiler to enable the C<fc> function,
which implements Unicode casefolding.
See L<perlfunc/fc> for details.
This feature is available from Perl 5.16 onwards.
=head1 FEATURE BUNDLES
It's possible to load multiple features together, using
Expand All @@ -232,7 +242,7 @@ The following feature bundles are available:
:5.14 say state switch unicode_strings array_base
:5.16 say state switch unicode_strings
unicode_eval evalbytes current_sub
unicode_eval evalbytes current_sub fc
The C<:default> bundle represents the feature set that is enabled before
any C<use feature> or C<no feature> declaration.
Expand Down
16 changes: 13 additions & 3 deletions regen/feature.pl
Expand Up @@ -30,6 +30,7 @@ BEGIN
current_sub => '__SUB__',
unicode_eval => 'unieval',
unicode_strings => 'unicode',
fc => 'fc',
);

# NOTE: If a feature is ever enabled in a non-contiguous range of Perl
Expand All @@ -45,9 +46,9 @@ BEGIN
"5.13" => [qw(say state switch unicode_strings array_base)],
"5.14" => [qw(say state switch unicode_strings array_base)],
"5.15" => [qw(say state switch unicode_strings unicode_eval
evalbytes current_sub)],
evalbytes current_sub fc)],
"5.16" => [qw(say state switch unicode_strings unicode_eval
evalbytes current_sub)],
evalbytes current_sub fc)],
);


Expand Down Expand Up @@ -330,7 +331,7 @@ sub longest {
__END__
package feature;
our $VERSION = '1.25';
our $VERSION = '1.26';
FEATURES
Expand Down Expand Up @@ -505,6 +506,15 @@ =head2 The 'array_base' feature
previous versions, it was simply on all the time, and this pragma knew
nothing about it.
=head2 The 'fc' feature
C<use feature 'fc'> tells the compiler to enable the C<fc> function,
which implements Unicode casefolding.
See L<perlfunc/fc> for details.
This feature is available from Perl 5.16 onwards.
=head1 FEATURE BUNDLES
It's possible to load multiple features together, using
Expand Down
1 change: 1 addition & 0 deletions t/porting/known_pod_issues.dat
Expand Up @@ -322,6 +322,7 @@ lib/english.pm Verbatim line length including indents exceeds 79 by 1
lib/exporter.pm Verbatim line length including indents exceeds 79 by 2
lib/extutils/embed.pm Verbatim line length including indents exceeds 79 by 2
lib/extutils/xssymset.pm Verbatim line length including indents exceeds 79 by 1
lib/feature.pm Apparent broken link 1
lib/file/basename.pm Verbatim line length including indents exceeds 79 by 2
lib/file/find.pm Verbatim line length including indents exceeds 79 by 1
lib/getopt/std.pm Verbatim line length including indents exceeds 79 by 1
Expand Down

0 comments on commit 2a4315f

Please sign in to comment.