]> git.ipfire.org Git - thirdparty/autoconf.git/commit
perl: Replace -w option in shebangs with ‘use warnings’ in code
authorSerhii Popovych <spopovyc@cisco.com>
Wed, 10 Feb 2016 16:32:44 +0000 (16:32 +0000)
committerZack Weinberg <zackw@panix.com>
Mon, 31 Aug 2020 17:11:46 +0000 (13:11 -0400)
commit17c048d8593140bc178016fa46eac7d55e367266
tree3a591721ba830d7ce477ee101bfe3e399055cb34
parent77153965c69e364e8bbd6711a4d04bfe28bdbcea
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.
13 files changed:
bin/autom4te.in
bin/autoreconf.in
bin/autoscan.in
bin/autoupdate.in
bin/ifnames.in
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