Re: [PATCH] Cleanup of the regexp API
[p5sagit/p5-mst-13.2.git] / ext / B / t / xref.t
index b1d0bc0..450582b 100644 (file)
@@ -1,8 +1,17 @@
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = qw(../lib);
+    if ($ENV{PERL_CORE}){
+       chdir('t') if -d 't';
+       @INC = ('.', '../lib');
+    } else {
+       unshift @INC, 't';
+    }
+    require Config;
+    if (($Config::Config{'extensions'} !~ /\bB\b/) ){
+        print "1..0 # Skip -- Perl configured without B module\n";
+        exit 0;
+    }
 }
 
 use strict;