X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;ds=sidebyside;f=t%2F32-localize_elem-block.t;h=776083105348c4c0517249f78077038ee9704a76;hb=c51f72ece23a7afb5590272f6aeca327b91a3945;hp=a1f4d4751602aa2c363093536ba23b2c2cbe580c;hpb=6d9ec3d17a2589cf3a259893f7ae752f5474ecf5;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/32-localize_elem-block.t b/t/32-localize_elem-block.t index a1f4d47..7760831 100644 --- a/t/32-localize_elem-block.t +++ b/t/32-localize_elem-block.t @@ -10,11 +10,11 @@ use Scope::Upper qw; use Scope::Upper::TestGenerator; -local $Scope::Upper::TestGenerator::testlocal = sub { '' }; +our $testcase; -local $Scope::Upper::TestGenerator::allblocks = 1; +local $Scope::Upper::TestGenerator::local_test = sub { '' }; -our $testcase; +local $Scope::Upper::TestGenerator::allblocks = 1; local $Scope::Upper::TestGenerator::call = sub { my ($height, $level, $i) = @_; @@ -28,10 +28,7 @@ local $Scope::Upper::TestGenerator::test = sub { return "is(\$a[1], $j, 'x h=$height, l=$level, i=$i');\n"; }; -local $Scope::Upper::TestGenerator::local = sub { - my $x = $_[3]; - return "local \$a[1] = $x;\n"; -}; +local $Scope::Upper::TestGenerator::local_var = '$a[1]'; our @a; @@ -58,10 +55,7 @@ local $Scope::Upper::TestGenerator::test = sub { return "is(\$h{a}, $j, 'x h=$height, l=$level, i=$i');\n"; }; -local $Scope::Upper::TestGenerator::local = sub { - my $x = $_[3]; - return "local \$h{a} = $x;\n"; -}; +local $Scope::Upper::TestGenerator::local_var = '$h{a}'; our %h;