[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: perl: use warnings instead of -
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: perl: use warnings instead of -w; consistent ordering of use, etc. |
Date: |
Mon, 31 Aug 2020 21:31:19 -0400 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=5cafaafd5b5fd3d14857a5f9db3285ea9cc435ab
The following commit(s) were added to refs/heads/master by this push:
new 5cafaaf perl: use warnings instead of -w; consistent ordering of use,
etc.
5cafaaf is described below
commit 5cafaafd5b5fd3d14857a5f9db3285ea9cc435ab
Author: Zack Weinberg <zackw@panix.com>
AuthorDate: Mon Aug 31 18:31:04 2020 -0700
perl: use warnings instead of -w; consistent ordering of use, etc.
Per thread at:
https://lists.gnu.org/archive/html/automake-patches/2020-08/msg00009.html
* bin/aclocal.in: use warnings instead of #!...-w;
consistent ordering of basic "use" directives,
then BEGIN block,
then standard modules in ASCII order,
then Automake:: modules (not sort),
finally use vars.
Also sort @ISA lists and use qw(...) in ASCII order.
* bin/automake.in: likewise.
* lib/Automake/ChannelDefs.pm: likewise.
* lib/Automake/Channels.pm: likewise.
* lib/Automake/Condition.pm: likewise.
* lib/Automake/Config.in: likewise.
* lib/Automake/Configure_ac.pm: likewise.
* lib/Automake/DisjConditions.pm: likewise.
* lib/Automake/FileUtils.pm: likewise.
* lib/Automake/General.pm: likewise.
* lib/Automake/Getopt.pm: likewise.
* lib/Automake/Item.pm: likewise.
* lib/Automake/ItemDef.pm: likewise.
* lib/Automake/Language.pm: likewise.
* lib/Automake/Location.pm: likewise.
* lib/Automake/Options.pm: likewise.
* lib/Automake/Rule.pm: likewise.
* lib/Automake/RuleDef.pm: likewise.
* lib/Automake/VarDef.pm: likewise.
* lib/Automake/Variable.pm: likewise.
* lib/Automake/Version.pm: likewise.
* lib/Automake/Wrap.pm: likewise.
* lib/Automake/XFile.pm: remove unnecessary imports of
Carp, DynaLoader, and File::Basename.
---
bin/aclocal.in | 11 +++++++----
bin/automake.in | 11 +++++++----
lib/Automake/ChannelDefs.pm | 25 +++++++++++++------------
lib/Automake/Channels.pm | 7 ++++---
lib/Automake/Condition.pm | 10 ++++++----
lib/Automake/Config.in | 6 ++++--
lib/Automake/Configure_ac.pm | 8 +++++---
lib/Automake/DisjConditions.pm | 4 +++-
lib/Automake/FileUtils.pm | 6 ++++--
lib/Automake/General.pm | 4 +++-
lib/Automake/Getopt.pm | 10 ++++++----
lib/Automake/Item.pm | 3 +++
lib/Automake/ItemDef.pm | 2 ++
lib/Automake/Language.pm | 2 ++
lib/Automake/Location.pm | 2 ++
lib/Automake/Options.pm | 6 ++++--
lib/Automake/Rule.pm | 9 ++++++---
lib/Automake/RuleDef.pm | 9 ++++++---
lib/Automake/VarDef.pm | 9 ++++++---
lib/Automake/Variable.pm | 8 +++++---
lib/Automake/Version.pm | 2 ++
lib/Automake/Wrap.pm | 10 ++++++----
lib/Automake/XFile.pm | 19 ++++++++-----------
23 files changed, 114 insertions(+), 69 deletions(-)
diff --git a/bin/aclocal.in b/bin/aclocal.in
index b61fed8..c968bd7 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# aclocal - create aclocal.m4 by scanning configure.ac -*- perl -*-
# @configure_input@
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
@@ -19,13 +19,18 @@
# Written by Tom Tromey <tromey@redhat.com>, and
# Alexandre Duret-Lutz <adl@gnu.org>.
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+
BEGIN
{
unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
unless $ENV{AUTOMAKE_UNINSTALLED};
}
-use strict;
+use File::Basename;
+use File::Path ();
use Automake::Config;
use Automake::General;
@@ -34,8 +39,6 @@ use Automake::Channels;
use Automake::ChannelDefs;
use Automake::XFile;
use Automake::FileUtils;
-use File::Basename;
-use File::Path ();
# Some globals.
diff --git a/bin/automake.in b/bin/automake.in
index c120787..1e4ccc8 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# automake - create Makefile.in from Makefile.am -*- perl -*-
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
@@ -22,7 +22,9 @@
package Automake;
+use 5.006;
use strict;
+use warnings FATAL => 'all';
BEGIN
{
@@ -39,6 +41,10 @@ BEGIN
$ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'};
}
+use Carp;
+use File::Basename;
+use File::Spec;
+
use Automake::Config;
BEGIN
{
@@ -66,9 +72,6 @@ use Automake::Rule;
use Automake::RuleDef;
use Automake::Wrap 'makefile_wrap';
use Automake::Language;
-use File::Basename;
-use File::Spec;
-use Carp;
## ----------------------- ##
## Subroutine prototypes. ##
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index 2ee6dd8..37c5a27 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -15,17 +15,6 @@
package Automake::ChannelDefs;
-use Automake::Config;
-BEGIN
-{
- if ($perl_threads)
- {
- require threads;
- import threads;
- }
-}
-use Automake::Channels;
-
=head1 NAME
Automake::ChannelDefs - channel definitions for Automake and helper functions
@@ -57,10 +46,22 @@ shorthand function to output on specific channels.
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Exporter;
-use vars qw (@ISA @EXPORT);
+use Automake::Channels;
+use Automake::Config;
+BEGIN
+{
+ if ($perl_threads)
+ {
+ require threads;
+ import threads;
+ }
+}
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
@EXPORT = qw (&prog_error &error &fatal &verb
&switch_warning &parse_WARNINGS &parse_warnings);
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 5fb01f5..7cc7ffd 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -68,12 +68,13 @@ etc.) that can also be overridden on a per-message basis.
use 5.006;
use strict;
-use Exporter;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
use File::Basename;
-use vars qw (@ISA @EXPORT %channels $me);
-
+use vars qw (@EXPORT @ISA %channels $me);
@ISA = qw (Exporter);
@EXPORT = qw ($exit_code $warnings_are_errors
&reset_local_duplicates &reset_global_duplicates
diff --git a/lib/Automake/Condition.pm b/lib/Automake/Condition.pm
index 7644116..072602a 100644
--- a/lib/Automake/Condition.pm
+++ b/lib/Automake/Condition.pm
@@ -17,12 +17,14 @@ package Automake::Condition;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
-require Exporter;
-use vars '@ISA', '@EXPORT_OK';
-@ISA = qw/Exporter/;
-@EXPORT_OK = qw/TRUE FALSE reduce_and reduce_or/;
+use vars qw (@EXPORT_OK @ISA);
+@ISA = qw (Exporter);
+@EXPORT_OK = qw (TRUE FALSE reduce_and reduce_or);
=head1 NAME
diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
index f79b8cd..d44e0ab 100644
--- a/lib/Automake/Config.in
+++ b/lib/Automake/Config.in
@@ -16,10 +16,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Config;
-use strict;
use 5.006;
-require Exporter;
+use strict;
+use warnings FATAL => 'all';
+
+use Exporter;
our @ISA = qw (Exporter);
our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm
index d60191b..0d9b465 100644
--- a/lib/Automake/Configure_ac.pm
+++ b/lib/Automake/Configure_ac.pm
@@ -22,12 +22,14 @@ package Automake::Configure_ac;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Exporter;
-use Automake::Channels;
-use Automake::ChannelDefs;
-use vars qw (@ISA @EXPORT);
+use Automake::ChannelDefs;
+use Automake::Channels;
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
@EXPORT = qw (&find_configure_ac &require_configure_ac);
diff --git a/lib/Automake/DisjConditions.pm b/lib/Automake/DisjConditions.pm
index dbe311e..af9d1a9 100644
--- a/lib/Automake/DisjConditions.pm
+++ b/lib/Automake/DisjConditions.pm
@@ -17,8 +17,10 @@ package Automake::DisjConditions;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
-use Automake::Condition qw/TRUE FALSE/;
+use Automake::Condition qw (TRUE FALSE);
=head1 NAME
diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm
index 40e236d..65f9216 100644
--- a/lib/Automake/FileUtils.pm
+++ b/lib/Automake/FileUtils.pm
@@ -36,14 +36,16 @@ This perl module provides various general purpose file
handling functions.
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Exporter;
use File::stat;
use IO::File;
+
use Automake::Channels;
use Automake::ChannelDefs;
-use vars qw (@ISA @EXPORT);
-
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
@EXPORT = qw (&contents
&find_file &mtime
diff --git a/lib/Automake/General.pm b/lib/Automake/General.pm
index dbb2138..ea7032c 100644
--- a/lib/Automake/General.pm
+++ b/lib/Automake/General.pm
@@ -17,10 +17,12 @@ package Automake::General;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Exporter;
use File::Basename;
-use vars qw (@ISA @EXPORT);
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
@EXPORT = qw (&uniq &none $me);
diff --git a/lib/Automake/Getopt.pm b/lib/Automake/Getopt.pm
index f8dc0ac..5d7d57b 100644
--- a/lib/Automake/Getopt.pm
+++ b/lib/Automake/Getopt.pm
@@ -33,14 +33,16 @@ line options in conformance to the GNU Coding standards.
use 5.006;
use strict;
use warnings FATAL => 'all';
+
+use Carp qw (confess croak);
use Exporter ();
use Getopt::Long ();
-use Automake::ChannelDefs qw/fatal/;
-use Carp qw/croak confess/;
-use vars qw (@ISA @EXPORT);
+use Automake::ChannelDefs qw (fatal);
+
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
-@EXPORT= qw/getopt/;
+@EXPORT = qw (getopt);
=item C<parse_options (%option)>
diff --git a/lib/Automake/Item.pm b/lib/Automake/Item.pm
index 85e114d..aee23e7 100644
--- a/lib/Automake/Item.pm
+++ b/lib/Automake/Item.pm
@@ -17,7 +17,10 @@ package Automake::Item;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+
use Automake::ChannelDefs;
use Automake::DisjConditions;
diff --git a/lib/Automake/ItemDef.pm b/lib/Automake/ItemDef.pm
index debcaa5..995fb11 100644
--- a/lib/Automake/ItemDef.pm
+++ b/lib/Automake/ItemDef.pm
@@ -17,6 +17,8 @@ package Automake::ItemDef;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
=head1 NAME
diff --git a/lib/Automake/Language.pm b/lib/Automake/Language.pm
index 4d5fa80..b85e0fa 100644
--- a/lib/Automake/Language.pm
+++ b/lib/Automake/Language.pm
@@ -17,8 +17,10 @@ package Automake::Language;
use 5.006;
use strict;
+use warnings FATAL => 'all';
use Class::Struct ();
+
Class::Struct::struct (
# Short name of the language (c, f77...).
'name' => "\$",
diff --git a/lib/Automake/Location.pm b/lib/Automake/Location.pm
index 8e4d1c7..611cd02 100644
--- a/lib/Automake/Location.pm
+++ b/lib/Automake/Location.pm
@@ -16,6 +16,8 @@
package Automake::Location;
use 5.006;
+use strict;
+use warnings FATAL => 'all';
=head1 NAME
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 59e29c5..5e20a34 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -17,14 +17,16 @@ package Automake::Options;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Exporter;
+
use Automake::Config;
use Automake::ChannelDefs;
use Automake::Channels;
use Automake::Version;
-use vars qw (@ISA @EXPORT);
-
+use vars qw (@EXPORT @ISA);
@ISA = qw (Exporter);
@EXPORT = qw (option global_option
set_option set_global_option
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 35e7b27..0227a85 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -17,7 +17,10 @@ package Automake::Rule;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
use Automake::Item;
use Automake::RuleDef;
@@ -26,9 +29,9 @@ use Automake::Channels;
use Automake::Options;
use Automake::Condition qw (TRUE FALSE);
use Automake::DisjConditions;
-require Exporter;
-use vars '@ISA', '@EXPORT', '@EXPORT_OK';
-@ISA = qw/Automake::Item Exporter/;
+
+use vars qw (@EXPORT @EXPORT_OK @ISA);
+@ISA = qw (Automake::Item Exporter);
@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain
suffixes rules $KNOWN_EXTENSIONS_PATTERN
depend %dependencies %actions register_action
diff --git a/lib/Automake/RuleDef.pm b/lib/Automake/RuleDef.pm
index d44f108..091a78c 100644
--- a/lib/Automake/RuleDef.pm
+++ b/lib/Automake/RuleDef.pm
@@ -17,13 +17,16 @@ package Automake::RuleDef;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
+
use Automake::ChannelDefs;
use Automake::ItemDef;
-require Exporter;
-use vars '@ISA', '@EXPORT';
-@ISA = qw/Automake::ItemDef Exporter/;
+use vars qw (@EXPORT @ISA);
+@ISA = qw (Automake::ItemDef Exporter);
@EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
=head1 NAME
diff --git a/lib/Automake/VarDef.pm b/lib/Automake/VarDef.pm
index d258a85..adeb6e2 100644
--- a/lib/Automake/VarDef.pm
+++ b/lib/Automake/VarDef.pm
@@ -17,13 +17,16 @@ package Automake::VarDef;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
+
use Automake::ChannelDefs;
use Automake::ItemDef;
-require Exporter;
-use vars '@ISA', '@EXPORT';
-@ISA = qw/Automake::ItemDef Exporter/;
+use vars qw (@ISA @EXPORT);
+@ISA = qw (Automake::ItemDef Exporter);
@EXPORT = qw (&VAR_AUTOMAKE &VAR_CONFIGURE &VAR_MAKEFILE
&VAR_ASIS &VAR_PRETTY &VAR_SILENT &VAR_SORTED);
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 363a3e0..4ec0dd4 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -17,7 +17,10 @@ package Automake::Variable;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Carp;
+use Exporter;
use Automake::Channels;
use Automake::ChannelDefs;
@@ -29,9 +32,8 @@ use Automake::DisjConditions;
use Automake::General 'uniq';
use Automake::Wrap 'makefile_wrap';
-require Exporter;
-use vars '@ISA', '@EXPORT', '@EXPORT_OK';
-@ISA = qw/Automake::Item Exporter/;
+use vars qw (@EXPORT @EXPORT_OK @ISA);
+@ISA = qw (Automake::Item Exporter);
@EXPORT = qw (err_var msg_var msg_cond_var reject_var
var rvar vardef rvardef
variables
diff --git a/lib/Automake/Version.pm b/lib/Automake/Version.pm
index c2722c0..16cdfb6 100644
--- a/lib/Automake/Version.pm
+++ b/lib/Automake/Version.pm
@@ -17,6 +17,8 @@ package Automake::Version;
use 5.006;
use strict;
+use warnings FATAL => 'all';
+
use Automake::ChannelDefs;
=head1 NAME
diff --git a/lib/Automake/Wrap.pm b/lib/Automake/Wrap.pm
index 0640cc9..c821b8b 100644
--- a/lib/Automake/Wrap.pm
+++ b/lib/Automake/Wrap.pm
@@ -17,11 +17,13 @@ package Automake::Wrap;
use 5.006;
use strict;
+use warnings FATAL => 'all';
-require Exporter;
-use vars '@ISA', '@EXPORT_OK';
-@ISA = qw/Exporter/;
-@EXPORT_OK = qw/wrap makefile_wrap/;
+use Exporter;
+
+use vars qw (@EXPORT_OK @ISA);
+@ISA = qw (Exporter);
+@EXPORT_OK = qw (wrap makefile_wrap);
=head1 NAME
diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 7d54404..5284faa 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -71,23 +71,20 @@ and C<getlines> methods to translate C<\r\n> to C<\n>.
use 5.006;
use strict;
-use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA);
-use Carp;
+use warnings FATAL => 'all';
+
use Errno;
+use Exporter;
use IO::File;
-use File::Basename;
+
use Automake::ChannelDefs;
-use Automake::Channels qw(msg);
+use Automake::Channels qw (msg);
use Automake::FileUtils;
-require Exporter;
-require DynaLoader;
-
-@ISA = qw(IO::File Exporter DynaLoader);
-
-$VERSION = "1.2";
-
+use vars qw ($AUTOLOAD @EXPORT @EXPORT_OK @ISA $VERSION);
+@ISA = qw(Exporter IO::File);
@EXPORT = @IO::File::EXPORT;
+$VERSION = "1.2";
eval {
# Make all Fcntl O_XXX and LOCK_XXX constants available for importing
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: perl: use warnings instead of -w; consistent ordering of use, etc.,
Karl Berry <=