update change#2670 to later version
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index 9fe98c4..78c8bf2 100755 (executable)
@@ -4,7 +4,7 @@
 # separate executable and can't simply use eval.
 
 chdir 't' if -d 't';
-@INC = "../lib";
+unshift @INC, "../lib";
 $ENV{PERL5LIB} = "../lib";
 
 $|=1;
@@ -411,7 +411,13 @@ destroyed
 package X;
 sub any { bless {} }
 my $f = "FH000"; # just to thwart any future optimisations
-sub afh { select select ++$f; my $r = *{$f}{IO}; delete $X::{$f}; bless $r }
+sub afh {
+    open(++$f, '>&STDOUT') or die;
+    select select $f;
+    my $r = *{$f}{IO};
+    delete $X::{$f};
+    bless $r;
+}
 sub DESTROY { print "destroyed\n" }
 package main;
 $x = any X; # to bump sv_objcount. IO objs aren't counted??