diff options
author | Father Chrysostomos <sprout@cpan.org> | 2016-05-20 14:30:14 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2016-05-20 15:59:58 -0700 |
commit | db629560b69530994e144a9d538421f72ec29483 (patch) | |
tree | bea0ae385bfc7a34ee6815833920d04ddb3b93fc /lib/feature.pm | |
parent | c2c360591864547f4210a9df74e0064cff39a11b (diff) | |
download | perl-db629560b69530994e144a9d538421f72ec29483.tar.gz |
Give feature.pm the concept of no-op features
Diffstat (limited to 'lib/feature.pm')
-rw-r--r-- | lib/feature.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index f197f48e26..caa7326ba9 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -14,12 +14,10 @@ our %feature = ( switch => 'feature_switch', bitwise => 'feature_bitwise', evalbytes => 'feature_evalbytes', - postderef => 'feature_postderef', array_base => 'feature_arybase', signatures => 'feature_signatures', current_sub => 'feature___SUB__', refaliasing => 'feature_refaliasing', - lexical_subs => 'feature_lexsubs', postderef_qq => 'feature_postderef_qq', unicode_eval => 'feature_unieval', unicode_strings => 'feature_unicode', @@ -30,7 +28,7 @@ our %feature_bundle = ( "5.11" => [qw(array_base say state switch unicode_strings)], "5.15" => [qw(current_sub evalbytes fc say state switch unicode_eval unicode_strings)], "5.23" => [qw(current_sub evalbytes fc postderef_qq say state switch unicode_eval unicode_strings)], - "all" => [qw(array_base bitwise current_sub evalbytes fc lexical_subs postderef postderef_qq refaliasing say signatures state switch unicode_eval unicode_strings)], + "all" => [qw(array_base bitwise current_sub evalbytes fc postderef_qq refaliasing say signatures state switch unicode_eval unicode_strings)], "default" => [qw(array_base)], ); @@ -48,6 +46,10 @@ $feature_bundle{"5.24"} = $feature_bundle{"5.23"}; $feature_bundle{"5.25"} = $feature_bundle{"5.23"}; $feature_bundle{"5.26"} = $feature_bundle{"5.23"}; $feature_bundle{"5.9.5"} = $feature_bundle{"5.10"}; +my %noops = ( + postderef => 1, + lexical_subs => 1, +); our $hint_shift = 26; our $hint_mask = 0x1c000000; @@ -497,6 +499,9 @@ sub __common { next; } if (!exists $feature{$name}) { + if (exists $noops{$name}) { + next; + } unknown_feature($name); } if ($import) { |