From 47e9d84a3af211d9a80e0f7c8a7d6c3f3d9c9cbc Mon Sep 17 00:00:00 2001 From: Eric Brine Date: Tue, 21 Jun 2011 19:51:47 -0700 Subject: [PATCH] Order features alphabetically --- lib/feature.pm | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/feature.pm b/lib/feature.pm index 2ee1018..78cb8fc 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 with no features specified will turn off all features. -=head2 The 'switch' feature - -C tells the compiler to enable the Perl 6 -given/when construct. - -See L for details. - =head2 The 'say' feature C tells the compiler to enable the Perl 6 @@ -107,6 +100,13 @@ variables. See L for details. +=head2 The 'switch' feature + +C tells the compiler to enable the Perl 6 +given/when construct. + +See L for details. + =head2 the 'unicode_strings' feature C tells the compiler to use Unicode semantics -- 2.7.4