diff options
author | Brian Fraser <fraserbn@gmail.com> | 2012-01-09 02:44:16 -0300 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-29 10:07:40 -0700 |
commit | 2a4315f8fb099a3fd3bbd5d9994af3919a6c5b05 (patch) | |
tree | c8d072bd39344d9d28c511f1412cfc74967f3424 | |
parent | b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15 (diff) | |
download | perl-2a4315f8fb099a3fd3bbd5d9994af3919a6c5b05.tar.gz |
Add the fc keyword in regen/feature.pl
It doesn't do anything yet.
-rw-r--r-- | feature.h | 7 | ||||
-rw-r--r-- | lib/feature.pm | 16 | ||||
-rwxr-xr-x | regen/feature.pl | 16 | ||||
-rw-r--r-- | t/porting/known_pod_issues.dat | 1 |
4 files changed, 34 insertions, 6 deletions
@@ -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 && \ diff --git a/lib/feature.pm b/lib/feature.pm index 9558f8c39e..399303acf9 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -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', @@ -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)], ); @@ -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 @@ -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. diff --git a/regen/feature.pl b/regen/feature.pl index 2444ad118d..0a232713a9 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -30,6 +30,7 @@ my %feature = ( 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 @@ -45,9 +46,9 @@ my %feature_bundle = ( "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)], ); @@ -330,7 +331,7 @@ read_only_bottom_close_and_rename($h); __END__ package feature; -our $VERSION = '1.25'; +our $VERSION = '1.26'; FEATURES @@ -505,6 +506,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 diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat index 4f1cea6b6c..2ccbaa1545 100644 --- a/t/porting/known_pod_issues.dat +++ b/t/porting/known_pod_issues.dat @@ -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 |