update the tests to strictures 2. ran ack to check this time. FFS.
[p5sagit/Package-Variant.git] / t / 30-pragma-leak.t
1 use strictures 2;
2 use Test::More;
3 use Test::Fatal;
4 use Package::Variant ();
5
6 BEGIN {
7   package TestPragma;
8   use Package::Variant
9     importing => [ 'strict' ];
10   sub make_variant { }
11   $INC{'TestPragma.pm'} = __FILE__;
12 }
13
14 is 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
23 is 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
32 done_testing;