Re: Pluggable lint patch
[p5sagit/p5-mst-13.2.git] / ext / B / t / bblock.t
index 1d8e04c..4979ea5 100644 (file)
@@ -1,8 +1,17 @@
 #!./perl -Tw
 
 BEGIN {
-    chdir 't';
-    @INC = '../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 Test::More tests => 1;