Re: Pluggable lint patch
[p5sagit/p5-mst-13.2.git] / ext / B / t / debug.t
index 2fe0044..0e502ee 100755 (executable)
@@ -1,12 +1,16 @@
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    if ($^O eq 'MacOS') {
-       @INC = qw(: ::lib ::macos:lib);
+    if ($ENV{PERL_CORE}){
+       chdir('t') if -d 't';
+       if ($^O eq 'MacOS') {
+           @INC = qw(: ::lib ::macos:lib);
+       } else {
+           @INC = '.';
+           push @INC, '../lib';
+       }
     } else {
-       @INC = '.';
-       push @INC, '../lib';
+       unshift @INC, 't';
     }
     require Config;
     if (($Config::Config{'extensions'} !~ /\bB\b/) ){