summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 16:37:50 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:15 -0800
commitc452a42fd6e47504c2b131e9070870660689823f (patch)
tree54c1639a693149b89a7c7b361828bdb21ca8c08c /regen
parent47222a2dfd12286d515f92f1b5c207f993a2d7df (diff)
downloadperl-c452a42fd6e47504c2b131e9070870660689823f.tar.gz
feature.pl: Add section headers
This commit adds comments that give this file some semblance of structure.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/feature.pl19
1 files changed, 18 insertions, 1 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index b4ad36a6c1..58a4590f3f 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -15,6 +15,10 @@ BEGIN {
}
use strict ;
+
+###########################################################################
+# Hand-editable data
+
# (feature name) => (internal name, used in %^H)
my %feature = (
say => 'say',
@@ -49,7 +53,9 @@ my %feature_bundle = (
evalbytes current_sub)],
);
+
###########################################################################
+# More data generated from the above
my %UniqueBundles; # "say state switch" => 5.10
my %Aliases; # 5.12 => 5.11
@@ -104,13 +110,16 @@ close "perl.h";
###########################################################################
-
+# Open files to be generated
my ($pm, $h) = map {
open_new($_, '>', { by => 'regen/feature.pl' });
} 'lib/feature.pm', 'feature.h';
+###########################################################################
+# Generate lib/feature.pm
+
while (<DATA>) {
last if /^FEATURES$/ ;
print $pm $_ ;
@@ -164,6 +173,10 @@ while (<DATA>) {
read_only_bottom_close_and_rename($pm);
+
+###########################################################################
+# Generate feature.h
+
my $first_bit = sprintf "0x%08x", 1 << $HintShift;
print $h <<EOH;
@@ -231,6 +244,10 @@ EOH
read_only_bottom_close_and_rename($h);
+
+###########################################################################
+# Template for feature.pm
+
__END__
package feature;