diff options
author | Eric Brine <ikegami@adaelis.com> | 2011-06-21 19:51:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-03 22:02:56 -0700 |
commit | 47e9d84a3af211d9a80e0f7c8a7d6c3f3d9c9cbc (patch) | |
tree | a535b79136da331032551b70a949cf684889a1f1 /lib/feature.pm | |
parent | d632d9afe2fe0ca4acebe9e4db95ef6ec14a299d (diff) | |
download | perl-47e9d84a3af211d9a80e0f7c8a7d6c3f3d9c9cbc.tar.gz |
Order features alphabetically
Diffstat (limited to 'lib/feature.pm')
-rw-r--r-- | lib/feature.pm | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index 2ee1018e28..78cb8fcd28 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -1,13 +1,13 @@ package feature; -our $VERSION = '1.21'; +our $VERSION = '1.22'; # (feature name) => (internal name, used in %^H) my %feature = ( + say => 'feature_say', + state => 'feature_state', switch => 'feature_switch', - say => "feature_say", - state => "feature_state", - unicode_strings => "feature_unicode", + unicode_strings => 'feature_unicode', ); # This gets set (for now) in $^H as well as in %^H, @@ -18,12 +18,12 @@ our $hint_uni8bit = 0x00000800; # NB. the latest bundle must be loaded by the -E switch (see toke.c) my %feature_bundle = ( - "5.10" => [qw(switch say state)], - "5.11" => [qw(switch say state unicode_strings)], - "5.12" => [qw(switch say state unicode_strings)], - "5.13" => [qw(switch say state unicode_strings)], - "5.14" => [qw(switch say state unicode_strings)], - "5.15" => [qw(switch say state unicode_strings)], + "5.10" => [qw(say state switch)], + "5.11" => [qw(say state switch unicode_strings)], + "5.12" => [qw(say state switch unicode_strings)], + "5.13" => [qw(say state switch unicode_strings)], + "5.14" => [qw(say state switch unicode_strings)], + "5.15" => [qw(say state switch unicode_strings)], ); # special case @@ -38,7 +38,7 @@ feature - Perl pragma to enable new features =head1 SYNOPSIS - use feature qw(switch say); + use feature qw(say switch); given ($foo) { when (1) { say "\$foo == 1" } when ([2,3]) { say "\$foo == 2 || \$foo == 3" } @@ -86,13 +86,6 @@ has lexical effect. C<no feature> with no features specified will turn off all features. -=head2 The 'switch' feature - -C<use feature 'switch'> tells the compiler to enable the Perl 6 -given/when construct. - -See L<perlsyn/"Switch statements"> for details. - =head2 The 'say' feature C<use feature 'say'> tells the compiler to enable the Perl 6 @@ -107,6 +100,13 @@ variables. See L<perlsub/"Persistent Private Variables"> for details. +=head2 The 'switch' feature + +C<use feature 'switch'> tells the compiler to enable the Perl 6 +given/when construct. + +See L<perlsyn/"Switch statements"> for details. + =head2 the 'unicode_strings' feature C<use feature 'unicode_strings'> tells the compiler to use Unicode semantics |