Upgrade to IO 1.22 from gbarr
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_utf8.t
index 7c87dc7..c4ba3de 100644 (file)
@@ -1,15 +1,17 @@
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
-    unless (find PerlIO::Layer 'perlio') {
+    unless(grep /blib/, @INC) {
+       chdir 't' if -d 't';
+       @INC = '../lib';
+    }
+    unless ($] >= 5.008 and find PerlIO::Layer 'perlio') {
        print "1..0 # Skip: not perlio\n";
        exit 0;
     }
 }
 
-require "./test.pl";
+require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
 
 plan(tests => 5);