b7a312c4a75d89caa68280821ff80b677ea45a2e
[p5sagit/p5-mst-13.2.git] / t / lib / mypragma.t
1 #!./perl
2
3 BEGIN {
4     chdir 't';
5     @INC = ('../lib', 'lib');
6 }
7
8 use strict;
9 use warnings;
10 use Test::More tests => 5;
11
12 use mypragma (); # don't enable this pragma yet
13
14 BEGIN {
15    is($^H{mypragma}, undef, "Shouldn't be in %^H yet");
16 }
17
18 is(mypragma::in_effect(), undef, "pragma not in effect yet");
19 {
20     use mypragma;
21     is(mypragma::in_effect(), 1, "pragma is in effect within this block");
22 }
23 is(mypragma::in_effect(), undef, "pragma no longer in effect");
24
25
26 BEGIN {
27    is($^H{mypragma}, undef, "Should no longer be in %^H");
28 }