[ID 20011126.150] t/op/pack patch to fix Useless use of unpack in void context at...
[p5sagit/p5-mst-13.2.git] / t / op / tiehandle.t
index cb9a290..7ae3351 100755 (executable)
@@ -77,7 +77,7 @@ package main;
 
 use Symbol;
 
-print "1..35\n";
+print "1..38\n";
 
 my $fh = gensym;
 
@@ -189,3 +189,31 @@ ok($r == 1);
     untie *STDIN;
 }
 
+
+{
+    # test for change 11639: Can't localize *FH, then tie it
+    {
+       local *foo;
+       tie %foo, 'Blah';
+    }
+    ok(!tied %foo);
+
+    {
+       local *bar;
+       tie @bar, 'Blah';
+    }
+    ok(!tied @bar);
+
+    {
+       local *BAZ;
+       tie *BAZ, 'Blah';
+    }
+    ok(!tied *BAZ);
+
+    package Blah;
+
+    sub TIEHANDLE {bless {}}
+    sub TIEHASH   {bless {}}
+    sub TIEARRAY  {bless {}}
+}
+