Change 27664 by [EMAIL PROTECTED] on 2006/04/01 15:26:48 Test that user pragmas work inside string eval.
Affected files ... ... //depot/perl/t/lib/mypragma.t#2 edit Differences ... ==== //depot/perl/t/lib/mypragma.t#2 (text) ==== Index: perl/t/lib/mypragma.t --- perl/t/lib/mypragma.t#1~27663~ 2006-04-01 07:22:54.000000000 -0800 +++ perl/t/lib/mypragma.t 2006-04-01 07:26:48.000000000 -0800 @@ -7,7 +7,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 9; use mypragma (); # don't enable this pragma yet @@ -17,10 +17,17 @@ is(mypragma::in_effect(), undef, "pragma not in effect yet"); { + is(mypragma::in_effect(), undef, "pragma not in effect yet"); + eval qq{is(mypragma::in_effect(), undef, "pragma not in effect yet"); 1} + or die $@; + use mypragma; 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 $@; BEGIN { End of Patch.