#!./perl
BEGIN {
chdir 't' if -d 't';
}
use strict;
use warnings;
BEGIN {
$| = 1;
print "1..9\n";
}
sub test ($$;$) {
return;
}
$diag =~ s/\Z\n?/\n/; # unchomp
}
# it's a regexp
} else {
}
# print "# $num: $got\n";
}
{
my %hash = (1..3);
test_warning 1, shift @warnings, $odd_msg;
%hash = 1;
test_warning 2, shift @warnings, $odd_msg;
%hash = { 1..3 };
test_warning 3, shift @warnings, $odd_msg2;
test_warning 4, shift @warnings, $ref_msg;
%hash = [ 1..3 ];
test_warning 5, shift @warnings, $ref_msg;
%hash = sub { print "ok" };
test_warning 6, shift @warnings, $odd_msg;
{
my $avhv = [{x=>1,y=>2}];
test_warning 7, shift @warnings, $odd_msg;
test_warning 8, shift @warnings, $odd_msg;
$_ = { 1..10 };
}
}