Skip to content

Commit

Permalink
Merge bf61293 into 7cc588f
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jul 24, 2014
2 parents 7cc588f + bf61293 commit d7c9e61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions t/import.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
use strict;
use Test::More;

no warnings;
use warnings::illegalproto;

$SIG{__WARN__} = sub { die $_[0] };
my $warn;
$SIG{__WARN__} = sub { $warn = $_[0] };

my $x = eval "sub (frew) { 1 }";
like $@, qr/prototype/, 'dies on "bad" prototype';
like $warn, qr/prototype/, 'dies on "bad" prototype';

undef $warn;
eval 'my $f = undef . "foo"';
is $@, '', 'other warnings not enabled';
is $warn, undef, 'other warnings not enabled';

done_testing;

0 comments on commit d7c9e61

Please sign in to comment.