summaryrefslogtreecommitdiff
path: root/regen/keywords.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-23 11:15:14 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-23 11:15:14 +0000
commit2d6469fed2ce846fe434cd5b8d5f5938bc345103 (patch)
tree6d53158793ab6336f48e0392a4d4a8813dd3b73a /regen/keywords.pl
parent3974d06f27877c075f99bc9560d1cd6f23ff9e4e (diff)
downloadperl-2d6469fed2ce846fe434cd5b8d5f5938bc345103.tar.gz
In regen scripts, print to explicit file handles instead of using select.
Also put explicit quotes on heredoc declarations to show whether they should interpolate, merge some heredocs, and remove & from calls to &tab(...)
Diffstat (limited to 'regen/keywords.pl')
-rwxr-xr-xregen/keywords.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/regen/keywords.pl b/regen/keywords.pl
index 1a84112d16..9b06182806 100755
--- a/regen/keywords.pl
+++ b/regen/keywords.pl
@@ -15,11 +15,10 @@ use strict;
require 'regen/regen_lib.pl';
my $kw = safer_open('keywords.h-new', 'keywords.h');
-select $kw;
-print read_only_top(lang => 'C', by => 'regen/keywords.pl', from => 'its data',
- file => 'keywords.h', style => '*',
- copyright => [1994 .. 1997, 1999 .. 2002, 2005 .. 2007]);
+print $kw read_only_top(lang => 'C', by => 'regen/keywords.pl',
+ from => 'its data', file => 'keywords.h', style => '*',
+ copyright => [1994 .. 1997, 1999 .. 2002, 2005 .. 2007]);
# Read & print data.
@@ -29,7 +28,7 @@ while (<DATA>) {
next unless $_;
next if /^#/;
my ($keyword) = split;
- print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
+ print $kw tab(5, "#define KEY_$keyword"), $keynum++, "\n";
}
read_only_bottom_close_and_rename($kw);