X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F44-localize_delete-magic.t;h=9cfec7e3712cdfcc50e8197fcd24966a93535421;hb=e7846e7f6fded4c4a3139054c5206c1480711867;hp=affe05b120cc71e85210e10fae51e4ee6ee5fc2f;hpb=0a6221d3f467b5f819e3c119b4cda0218399cb51;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/44-localize_delete-magic.t b/t/44-localize_delete-magic.t index affe05b..9cfec7e 100644 --- a/t/44-localize_delete-magic.t +++ b/t/44-localize_delete-magic.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Scope::Upper qw/localize_delete UP HERE/; +use Scope::Upper qw; use Test::More tests => 9; @@ -25,9 +25,10 @@ our $deleted; our @a; -tie @a, 'Scope::Upper::Test::TiedArray'; { - local @a = (5 .. 7); + local @a; + tie @a, 'Scope::Upper::Test::TiedArray'; + @a = (5 .. 7); local $a[4] = 9; is $deleted, undef, 'localize_delete @tied_array, $existent => HERE [not deleted]'; { @@ -40,7 +41,9 @@ tie @a, 'Scope::Upper::Test::TiedArray'; } { - local @a = (4 .. 6); + local @a; + tie @a, 'Scope::Upper::Test::TiedArray'; + @a = (4 .. 6); local $a[4] = 7; { localize_delete '@main::a', -1 => HERE; @@ -51,9 +54,12 @@ tie @a, 'Scope::Upper::Test::TiedArray'; SKIP: { - skip '$NEGATIVE_INDICES has no special meaning on 5.8.0 and older' => 2 if $] < 5.008_001; + skip '$NEGATIVE_INDICES has no special meaning on 5.8.0 and older' => 2 + if "$]" < 5.008_001; local $Scope::Upper::Test::TiedArray::NEGATIVE_INDICES = 1; - local @a = (4 .. 6); + local @a; + tie @a, 'Scope::Upper::Test::TiedArray'; + @a = (4 .. 6); local $a[4] = 7; { localize_delete '@main::a', -1 => HERE;