Debian Codegraph @

t/classes/Dancer2/import-pragmas.t

raw
1 use strict;
2 use Test::More tests => 1;
3
4 {
5 package App::NoWarnings; ## no critic
6 no warnings 'misc'; # masks earlier declaration
7 use Dancer2 ':nopragmas';
8
9 local $@ = undef;
10 my $got_warning;
11
12 local $SIG{'__WARN__'} = sub {
13 $got_warning++;
14 };
15
16 eval 'my $var; my $var;'; ## no critic
17 ::is( $got_warning, undef, 'warnings pragma not activated' );
18 }