diff options
author | Zack Weinberg <zackw@panix.com> | 2020-09-21 14:33:52 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-09-21 14:33:52 -0400 |
commit | 904d8e72e5a511dde72173a1d7f0e4c1e5bf4b79 (patch) | |
tree | 71aa750e24dc57bcb38e9c49d9b535f072ed93c0 /bin/autoheader.in | |
parent | f48d5cee1c57bd3c6c136fc1b83cc00871fd9aa2 (diff) | |
download | autoconf-904d8e72e5a511dde72173a1d7f0e4c1e5bf4b79.tar.gz |
Consistently use ‘our’ instead of ‘use vars’ in Perl.
At file scope of a file containing at most one ‘package’ declaration,
‘use vars’ is exactly equivalent to ‘our’, and the latter is preferred
starting with Perl 5.6.0, which happens to be the oldest version we
support.
In one place ‘our’ was not actually necessary and was switched to ‘my’.
(This change has already been made in Automake and applied to the
shared Perl code via the previous ‘make fetch’ commit.)
* lib/Autom4te/C4che.pm
* lib/Autom4te/ChannelDefs.pm
* lib/Autom4te/General.pm: Replace all uses of ‘use vars’ with ‘our’.
* bin/autoheader.in: Replace all uses of ‘use vars’ with ‘our’.
Remove an unnecessary ‘local’.
* bin/autoscan.in: Convert ‘use vars’ variables to ‘my’ variables.
Diffstat (limited to 'bin/autoheader.in')
-rw-r--r-- | bin/autoheader.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/autoheader.in b/bin/autoheader.in index 64f90de4..29d0fe52 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -49,12 +49,12 @@ use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; -# Using 'do FILE', we need 'local' vars. -use vars qw ($config_h %symbol %verbatim); +# These vars must be package globals so they can be accessed by code +# evaluated via 'do FILE', below. +our ($config_h, %symbol, %verbatim); # Lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; -local $config_h; my $config_h_in; my @prepend_include; my @include; |