Upgrade to Class::ISA 0.36 (Fixes installation directories only)
[p5sagit/p5-mst-13.2.git] / make_ext.pl
index e272d5b..7734bf5 100644 (file)
@@ -3,10 +3,15 @@ use strict;
 use warnings;
 use Config;
 BEGIN {
-    unshift @INC, $^O eq 'MSWin32' ? ('../cpan/Cwd', '../cpan/Cwd/lib') : 'cpan/Cwd';
+    if ($^O eq 'MSWin32') {
+       unshift @INC, ('../cpan/Cwd', '../cpan/Cwd/lib');
+       require File::Spec::Functions;
+    }
+    else {
+       unshift @INC, 'cpan/Cwd';
+    }
 }
 use Cwd;
-use File::Spec::Functions qw(rel2abs);
 
 # To clarify, this isn't the entire suite of modules considered "toolchain"
 # It's not even all modules needed to build ext/
@@ -289,7 +294,7 @@ sub build_extension {
     # another process has half-written.
     my @new_inc = ((map {"$up/$_"} @toolchain), $lib_dir);
     if ($is_Win32) {
-       @new_inc = map {rel2abs($_)} @new_inc;
+       @new_inc = map {File::Spec::Functions::rel2abs($_)} @new_inc;
     }
     $ENV{PERL5LIB} = join $Config{path_sep}, @new_inc;
     $ENV{PERL_CORE} = 1;