]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/44-localize_delete-magic.t
Tie the array after localizing it in t/{34,44}-*-magic.t
[perl/modules/Scope-Upper.git] / t / 44-localize_delete-magic.t
index affe05b120cc71e85210e10fae51e4ee6ee5fc2f..bf0c43d6eb6cc3ffe40b9c103fd6dee8c600f8f3 100644 (file)
@@ -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;
@@ -53,7 +56,9 @@ SKIP:
 {
  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;