This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
feature.pl: Use @HintedBundles for generating feature.h
authorFather Chrysostomos <sprout@cpan.org>
Fri, 23 Dec 2011 02:12:35 +0000 (18:12 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Dec 2011 17:25:16 +0000 (09:25 -0800)
This variable, added in the previous commit for feature.pm’s sake,
also makes generating constants in feature.h simpler.

regen/feature.pl

index a6896fe..8e11f99 100755 (executable)
@@ -213,14 +213,12 @@ print $h <<EOH;
 
 #define HINT_FEATURE_SHIFT     $HintShift
 
-#define FEATURE_BUNDLE_DEFAULT 0
 EOH
 
 my $count;
-for (sort values %UniqueBundles) {
-    (my $key = $_) =~ y/.//d;
-    next if $key =~ /\D/;
-    print $h "#define FEATURE_BUNDLE_$key      ", ++$count, "\n";
+for (@HintedBundles) {
+    (my $key = uc) =~ y/.//d;
+    print $h "#define FEATURE_BUNDLE_$key      ", $count++, "\n";
 }
 
 print $h <<EOH;