plan tests => 14697;
use strict;
-use warnings;
+use warnings qw(FATAL all);
use Config;
my $Is_EBCDIC = (defined $Config{ebcdic} && $Config{ebcdic} eq 'define');
my $foo;
open(BIN, $Perl) || die "Can't open $Perl: $!\n";
+ binmode BIN;
sysread BIN, $foo, 8192;
close BIN;
# temps
sub foo { my $a = "a"; return $a . $a++ . $a++ }
{
- use warnings;
+ use warnings qw(NONFATAL all);;
my $warning;
local $SIG{__WARN__} = sub {
$warning = $_[0];
# does unpack U0U on byte data warn?
{
+ use warnings qw(NONFATAL all);;
+
my $bad = pack("U0C", 255);
local $SIG{__WARN__} = sub { $@ = "@_" };
my @null = unpack('U0U', $bad);
}
{ # more on grouping (W.Laun)
- use warnings;
- my $warning;
- local $SIG{__WARN__} = sub {
- $warning = $_[0];
- };
# @ absolute within ()-group
my $badc = pack( '(a)*', unpack( '(@1a @0a @2)*', 'abcd' ) );
is( $badc, 'badc' );
}
{ # syntax checks (W.Laun)
- use warnings;
+ use warnings qw(NONFATAL all);;
my @warning;
local $SIG{__WARN__} = sub {
push( @warning, $_[0] );
$b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble
is($b, "@a @a");
+ use warnings qw(NONFATAL all);;
my $warning;
local $SIG{__WARN__} = sub {
$warning = $_[0];
}
{
+ use warnings qw(NONFATAL all);;
my $warning;
local $SIG{__WARN__} = sub {
$warning = $_[0];