Upgrade to IO 1.22 from gbarr
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_linenum.t
index cf55c98..a1b1bc6 100755 (executable)
@@ -5,16 +5,14 @@
 
 my $File;
 
-BEGIN
-{
-  $File = __FILE__;
-  if (-d 't')
-  {
-    chdir 't';
-    $File =~ s/^t\W+//;                                 # Remove first directory
-  }
-  @INC = '../lib';
-  require strict; import strict;
+BEGIN {
+    $File = __FILE__;
+    unless(grep /blib/, @INC) {
+       chdir 't' if -d 't';
+       $File =~ s/^t\W+//;                                 # Remove first directory
+       @INC = '../lib';
+    }
+    require strict; import strict;
 }
 
 use Test;