Integrate perlio:
[p5sagit/p5-mst-13.2.git] / t / lib / selfloader.t
index 9c585a5..6b9c244 100755 (executable)
@@ -3,7 +3,8 @@
 BEGIN {
     chdir 't' if -d 't';
     $dir = "self-$$";
-    unshift @INC, ("./$dir", "../lib");
+    @INC = $dir;
+    push @INC, '../lib';
 
     print "1..19\n";
 
@@ -165,6 +166,7 @@ if ($@ =~ /^Undefined subroutine/) {
 
 # Try to read from the data file handle
 my $foodata = <Foo::DATA>;
+close Foo::DATA;
 if (defined $foodata) {
     print "not ok 17 # $foodata\n";
 } else {
@@ -184,6 +186,7 @@ if ($@ =~ /^Undefined subroutine/) {
 
 # Try to read from the data file handle
 my $bardata = <Bar::DATA>;
+close Bar::DATA;
 if ($bardata ne "sub never { die \"D'oh\" }\n") {
     print "not ok 19 # $bardata\n";
 } else {