Skip to content

Commit

Permalink
automake: just use warnings, with no => FATAL.
Browse files Browse the repository at this point in the history
Per Perl recommendation:
  https://perldoc.perl.org/warnings#Fatal-Warnings
Suggested by Collin Funk:
  https://lists.gnu.org/archive/html/automake/2025-01/msg00003.html
And in the Perl discussion:
  Perl/perl5#22954 (comment)

* bin/aclocal.in: just use warnings, not making them fatal.
* bin/automake.in:
* contrib/tap-driver.pl:
* gen-testsuite-part:
* lib/Automake/ChannelDefs.pm:
* lib/Automake/Channels.pm:
* lib/Automake/Condition.pm:
* lib/Automake/Config.in:
* lib/Automake/Configure_ac.pm:
* lib/Automake/DisjConditions.pm:
* lib/Automake/FileUtils.pm:
* lib/Automake/General.pm:
* lib/Automake/Getopt.pm:
* lib/Automake/Item.pm:
* lib/Automake/ItemDef.pm:
* lib/Automake/Language.pm:
* lib/Automake/Location.pm:
* lib/Automake/Options.pm:
* lib/Automake/Rule.pm:
* lib/Automake/RuleDef.pm:
* lib/Automake/VarDef.pm:
* lib/Automake/Variable.pm:
* lib/Automake/Version.pm:
* lib/Automake/Wrap.pm:
* lib/Automake/XFile.pm:
* t/ax/deltree.pl:
* t/ax/extract-testsuite-summary.pl:
* t/check-fd-redirect.sh:
* t/tap-signal.tap:
* t/tests-environment-fd-redirect.sh:
* t/testsuite-summary-count-many.sh:
  • Loading branch information
kberry committed Jan 31, 2025
1 parent b5403ee commit fc1c3f6
Show file tree
Hide file tree
Showing 31 changed files with 33 additions and 93 deletions.
4 changes: 1 addition & 3 deletions bin/aclocal.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
# Written by Tom Tromey <[email protected]>, and
# Alexandre Duret-Lutz <[email protected]>.

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

BEGIN
{
Expand Down
4 changes: 1 addition & 3 deletions bin/automake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

package Automake;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

BEGIN
{
Expand Down
6 changes: 3 additions & 3 deletions contrib/tap-driver.pl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
# Imports, static data, and setup. #
# ---------------------------------- #

use warnings FATAL => 'all';
use strict;
use strict; use warnings;
use Getopt::Long ();

use TAP::Parser;

my $VERSION = '2024-12-03.03'; # UTC
my $VERSION = '2025-01-31.17'; # UTC

my $ME = "tap-driver.pl";

Expand Down
2 changes: 1 addition & 1 deletion gen-testsuite-part
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#--------------------------------------------------------------------------

use warnings FATAL => "all";
use strict;
use warnings;
use File::Basename ();
use constant TRUE => 1;
use constant FALSE => 0;
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/ChannelDefs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ shorthand function to output on specific channels.
=cut

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Exporter;

use Automake::Channels;
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Channels.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ etc.) that can also be overridden on a per-message basis.
=cut

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;
use File::Basename;
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Condition.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::Condition;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;

Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package Automake::Config;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Exporter;

Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Configure_ac.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

package Automake::Configure_ac;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Exporter;

Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/DisjConditions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::DisjConditions;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Carp;
use Automake::Condition qw (TRUE FALSE);
Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/FileUtils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ This perl module provides various general purpose file handling functions.
=cut

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

BEGIN
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/General.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::General;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Exporter;
use File::Basename;
Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Getopt.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ line options in conformance to the GNU Coding standards.
=cut

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Carp qw (confess croak);
use Exporter ();
Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Item.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::Item;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Carp;

Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/ItemDef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::ItemDef;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;

=head1 NAME
Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Language.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::Language;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Class::Struct ();

Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Location.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::Location;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

=head1 NAME
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Options.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::Options;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Exporter;

use Automake::Config;
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Rule.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::Rule;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;

Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/RuleDef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::RuleDef;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;

Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/VarDef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::VarDef;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;

Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Variable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::Variable;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Carp;
use Exporter;

Expand Down
4 changes: 1 addition & 3 deletions lib/Automake/Version.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package Automake::Version;

use 5.006;
use strict;
use warnings FATAL => 'all';
use 5.006; use strict; use warnings;

use Automake::ChannelDefs;

Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/Wrap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

package Automake::Wrap;

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Exporter;

our @ISA = qw (Exporter);
Expand Down
5 changes: 1 addition & 4 deletions lib/Automake/XFile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ and C<getlines> methods to translate C<\r\n> to C<\n>.
=cut

use 5.006;
use strict;
use warnings FATAL => 'all';

use 5.006; use strict; use warnings;
use Errno;
use Exporter;
use IO::File;
Expand Down
3 changes: 1 addition & 2 deletions t/ax/deltree.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

use strict;
use warnings FATAL => 'all';
use strict; use warnings;
use File::Path qw/rmtree/;

my $exit_status = 0;
Expand Down
3 changes: 1 addition & 2 deletions t/ax/extract-testsuite-summary.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

use warnings FATAL => 'all';
use strict;
use strict; use warnings;

my $br = '=' x 76;
my @sections = ('');
Expand Down
3 changes: 1 addition & 2 deletions t/check-fd-redirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ do_check

echo "#! $PERL -w" > foo.test
cat >> foo.test <<'END'
use warnings FATAL => 'all';
use strict;
use strict; use warnings;
open (FD3, "<&=3") or die "opening FD3: $!";
open (FD4, ">&=4") or die "opening FD4: $!";
Expand Down
2 changes: 1 addition & 1 deletion t/tap-signal.tap
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for sig in $all_signals; do
# We need autoflush to avoid losing output, which could cause spurious
# "no test plan seen" in the TAP driver.
BEGIN { $| = 1 }
use warnings FATAL => "all";
use warnings;
print "1..1\\n";
print "ok 1\\n";
kill $sig, \$\$;
Expand Down
2 changes: 1 addition & 1 deletion t/tests-environment-fd-redirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ END

echo "#! $PERL -w" > bar.test
cat >>bar.test <<'END'
use warnings FATAL => 'all';
use strict;
use warnings;
open(FD8, ">&=8") or die "$!";
open(FD9, ">&=9") or die "$!";
print FD8 " $0: 8888\n";
Expand Down
2 changes: 1 addition & 1 deletion t/testsuite-summary-count-many.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ END
chmod a+x all.test

$PERL -w -e '
use warnings FATAL => "all";
use strict;
use warnings;
my $base = 1000;
my %count = (
Expand Down

0 comments on commit fc1c3f6

Please sign in to comment.