From: Vincent Pit Date: Fri, 5 Dec 2008 17:16:34 +0000 (+0100) Subject: "use feature 'state'" as a prefix, so that we'll be able to skip it on older perls X-Git-Tag: v0.09~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=4575bb0d8b810adecce86133968da53594a9ec40;p=perl%2Fmodules%2Findirect.git "use feature 'state'" as a prefix, so that we'll be able to skip it on older perls --- diff --git a/t/10-good.t b/t/10-good.t index da9b2d7..32b62ec 100644 --- a/t/10-good.t +++ b/t/10-good.t @@ -11,11 +11,8 @@ use warnings; use Test::More tests => 52 * 4; -use feature 'state'; - my ($obj, $pkg, $cb, $x, @a); our $y; -state $z; sub meh; { @@ -150,9 +147,9 @@ meh $x, 1, 2; meh $y; #### meh $y, 1, 2; -#### +#### # use feature 'state'; state $z meh $z; -#### +#### # use feature 'state'; state $z meh $z, 1, 2; #### print; @@ -166,9 +163,9 @@ print $x "oh hai\n"; print $y; #### print $y "dongs\n"; -#### +#### # use feature 'state'; state $z print $z; -#### +#### # use feature 'state'; state $z print $z "hlagh\n"; #### print STDOUT "bananananananana\n"; diff --git a/t/20-bad.t b/t/20-bad.t index 65511fd..5abb4ad 100644 --- a/t/20-bad.t +++ b/t/20-bad.t @@ -11,11 +11,8 @@ use warnings; use Test::More tests => 50 * 6 + 2; -use feature 'state'; - my ($obj, $x); our ($y, $bloop); -state $z; sub expect { my ($pkg) = @_; @@ -151,11 +148,11 @@ meh $y; meh $y 1, 2; #### meh $y, 1, 2; -#### +#### # use feature 'state'; state $z meh $z; -#### +#### # use feature 'state'; state $z meh $z 1, 2; -#### +#### # use feature 'state'; state $z meh $z, 1, 2; #### package sploosh;