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:
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@
use Autom4te::XFile;
use File::Basename;
use strict;
+use warnings;
# Data directory.
my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@';
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@
# Do not use Cwd::chdir, since it might hang.
use Cwd 'cwd';
use strict;
+use warnings;
## ----------- ##
## Variables. ##
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@
use File::Basename;
use File::Find;
use strict;
+use warnings;
use vars qw(@cfiles @makefiles @shfiles @subdirs %printed);
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@
use Autom4te::XFile;
use File::Basename;
use strict;
+use warnings;
# Lib files.
my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@
use Autom4te::General;
use Autom4te::XFile;
use Autom4te::FileUtils;
+use warnings;
# $HELP
# -----
use Autom4te::Request;
use Carp;
use strict;
+use warnings;
=over 4
use 5.006;
use strict;
+use warnings;
use Exporter;
use vars qw (@ISA @EXPORT);
use 5.006;
use strict;
+use warnings;
use Exporter;
use Carp;
use File::Basename;
use 5.006;
use strict;
+use warnings;
use Exporter;
use Autom4te::Channels;
use Autom4te::ChannelDefs;
use 5.006;
use strict;
+use warnings;
use Exporter;
use File::stat;
use IO::File;
use IO::File;
use Carp;
use strict;
-
+use warnings;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
=cut
use strict;
+use warnings;
use Class::Struct;
use Carp;
use Data::Dumper;
use 5.006;
use strict;
+use warnings;
use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA);
use Carp;
use Errno;