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 /bin/ifnames.in | |
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 'bin/ifnames.in')
-rw-r--r-- | bin/ifnames.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ifnames.in b/bin/ifnames.in index c0c1f58b..f60d3a0f 100644 --- a/bin/ifnames.in +++ b/bin/ifnames.in @@ -1,4 +1,4 @@ -#! @PERL@ -w +#! @PERL@ # -*- perl -*- # @configure_input@ @@ -44,6 +44,7 @@ BEGIN use Autom4te::General; use Autom4te::XFile; use Autom4te::FileUtils; +use warnings; # $HELP # ----- |