Commit | Line | Data |
---|---|---|
c3398f5b | 1 | #!/usr/bin/env perl |
2 | use Test::More tests => 1; | |
c3398f5b | 3 | |
a7f212f1 | 4 | # we used to use Test::Warn here but there's no point in adding three deps total |
5 | # for this one easy test | |
6 | ||
7 | my @warnings; | |
8 | local $SIG{__WARN__} = sub { | |
9 | push @warnings, "@_"; | |
10 | }; | |
11 | ||
12 | do { | |
c3398f5b | 13 | package Class; |
14 | use Mouse; | |
15 | ||
16 | my $one = 1 + undef; | |
a7f212f1 | 17 | }; |
18 | ||
19 | like("@warnings", qr/^Use of uninitialized value/, 'using Mouse turns on warnings'); | |
c3398f5b | 20 |