use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 13;
use mypragma (); # don't enable this pragma yet
is(mypragma::in_effect(), 1, "pragma is in effect within this block");
eval qq{is(mypragma::in_effect(), 1,
"pragma is in effect within this eval"); 1} or die $@;
+
+ {
+ no mypragma;
+ is(mypragma::in_effect(), 0, "pragma no longer in effect");
+ eval qq{is(mypragma::in_effect(), 0, "pragma no longer in effect"); 1}
+ or die $@;
+ }
+
+ is(mypragma::in_effect(), 1, "pragma is in effect within this block");
+ eval qq{is(mypragma::in_effect(), 1,
+ "pragma is in effect within this eval"); 1} or die $@;
}
is(mypragma::in_effect(), undef, "pragma no longer in effect");
eval qq{is(mypragma::in_effect(), undef, "pragma not in effect"); 1} or die $@;