16 use vars qw{ @warnings $sub $warn };
19 $warn = 'Illegal character in prototype';
23 cmp_ok(scalar(@warnings), '==', 1, 'One warning');
24 cmp_ok(substr($warnings[0],0,length($warn)),'eq',$warn,'warning message');
29 cmp_ok(scalar(@warnings), '==', 0, 'No warnings');
34 $SIG{'__WARN__'} = sub { push @warnings, @_ };
38 BEGIN { @warnings = () }
56 no warnings 'illegalproto';
66 use warnings 'illegalproto';
75 $warn = q{Prototype after '@' for};
94 no warnings 'illegalproto';
103 no warnings 'syntax';
104 use warnings 'illegalproto';