Bug#663544: use warnings FATAL => 'all' should either print all or none of the warnings, not half!

jidanni at jidanni.org jidanni at jidanni.org
Mon Mar 12 05:47:42 UTC 2012


Package: perl
Version: 5.14.2-9


Mom always taught me to use

use warnings FATAL => 'all';

Now I learn that it will only get me half the warnings!

#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
my %l;
while (<>) {
    /(?<B>.)/;
    push @{ $l{$+{B} }, 4;
}

And in the above case the wrong ones come out first, and the right ones
are cut off before they reach me.

OK, so I suppose we are stuck with it.

So please say on warnings(3perl)
how to get my cake and eat it too.

How to print all warnings, and then die if there were any.

Wait, reading warnings(3perl) one finds no way to delay the FATAL action
until 'all' the warnings are finished printing ... BUG!






More information about the Perl-maintainers mailing list