diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-09 21:37:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-09 21:37:31 +0000 |
commit | eada5d412b7a767990239a3620a5cffcd3543384 (patch) | |
tree | 76fca4bfaeaad129f550b0c02ce0da857a4645b3 | |
parent | 56a0c3328a732586fccec16bf813d122fa89f510 (diff) | |
download | perl-eada5d412b7a767990239a3620a5cffcd3543384.tar.gz |
Make keywords.pl strict and warnings clean.
p4raw-id: //depot/perl@29739
-rwxr-xr-x | keywords.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/keywords.pl b/keywords.pl index f233b6a45c..d702a1a01f 100755 --- a/keywords.pl +++ b/keywords.pl @@ -1,4 +1,5 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w +use strict; require 'regen_lib.pl'; safer_unlink ("keywords.h"); @@ -25,12 +26,12 @@ EOM # Read & print data. -$keynum = 0; +my $keynum = 0; while (<DATA>) { chop; next unless $_; next if /^#/; - ($keyword) = split; + my ($keyword) = split; print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; } @@ -40,7 +41,7 @@ close KW or die "Error closing keywords.h: $!"; ########################################################################### sub tab { - local($l, $t) = @_; + my ($l, $t) = @_; $t .= "\t" x ($l - (length($t) + 1) / 8); $t; } |