diff options
author | Serhii Popovych <spopovyc@cisco.com> | 2016-02-10 16:32:44 +0000 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-08-31 13:11:46 -0400 |
commit | 17c048d8593140bc178016fa46eac7d55e367266 (patch) | |
tree | 3a591721ba830d7ce477ee101bfe3e399055cb34 /lib/Autom4te/General.pm | |
parent | 77153965c69e364e8bbd6711a4d04bfe28bdbcea (diff) | |
download | autoconf-17c048d8593140bc178016fa46eac7d55e367266.tar.gz |
perl: Replace -w option in shebangs with ‘use warnings’ in code
Some downstream redistributors for Autoconf wish to use
‘/usr/bin/env perl’ as the #! line for the installed Perl scripts.
This does not work with command-line options on the #! line, as the
kernel doesn’t support supplying more than one argument to a #!
interpreter (this limitation is universal across Unixes that
support #!, as far as I know).
Remove ‘-w’ from all perl #! lines and instead add ‘use warnings’
to all the scripts and .pm files that didn’t already have it.
This ‘use’ directive was added to Perl in version 5.6.0 (aka 5.006)
so there is no change to our minimum Perl requirement.
(It is necessary to add ‘use warnings’ to all the .pm files as well as
the scripts, because the ‘-w’ command-line option turns on warnings
globally, but ‘use warnings’ does so only for the current lexical scope.)
Patch uplifted from OpenEmbedded, originally by Serhii Popovych.
It’s a mechanical search-and-replace change so I do not believe a
copyright assignment is necessary.
* bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in
* bin/autoupdate.in, bin/ifnames.in: Remove -w from #! line
and add ‘use warnings’ to imports.
* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm
* lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm
* lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm
* lib/Autom4te/Request.pm, lib/Autom4te/XFile.pm:
Add ‘use warnings’ to imports.
Diffstat (limited to 'lib/Autom4te/General.pm')
-rw-r--r-- | lib/Autom4te/General.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Autom4te/General.pm b/lib/Autom4te/General.pm index 4f397b0c..76dbd426 100644 --- a/lib/Autom4te/General.pm +++ b/lib/Autom4te/General.pm @@ -43,7 +43,7 @@ use File::stat; use IO::File; use Carp; use strict; - +use warnings; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); |