update the tests to strictures 2. ran ack to check this time. FFS.
[p5sagit/Package-Variant.git] / t / 30-pragma-leak.t
CommitLineData
d4b2facb 1use strictures 2;
3c1ca277 2use Test::More;
3use Test::Fatal;
4use Package::Variant ();
5
6BEGIN {
7 package TestPragma;
8 use Package::Variant
9 importing => [ 'strict' ];
10 sub make_variant { }
11 $INC{'TestPragma.pm'} = __FILE__;
12}
13
14is exception {
15 eval q{
16 no strict;
17 use TestPragma;
18 $var = $var;
19 1;
20 } or die $@;
21}, undef, 'pragmas not applied where PV package used';
22
23is exception {
24 eval q{
25 no strict;
26 BEGIN { my $p = TestPragma(); }
27 $var2 = $var2;
28 1;
29 } or die $@;
30}, undef, 'pragmas not applied where PV generator used';
31
32done_testing;