Fix warning
[p5sagit/local-lib.git] / Makefile.PL
index 2714a0d..3dea5bf 100644 (file)
@@ -3,6 +3,7 @@ use warnings;
 use File::Spec;
 use Cwd;
 use vars qw($bootstrapping $bootstrapping_args);
+use Config;
 
 my $cwd;
 BEGIN {
@@ -37,7 +38,7 @@ DEATH
 
     local::lib->import(@args);
 
-    my @libs = map { "-I$_" } split ':', $ENV{PERL5LIB};
+    my @libs = map { "-I$_" } split $Config{path_sep}, $ENV{PERL5LIB};
     $bootstrapping_args = "@libs";
     push(@ARGV,$ENV{PERL_MM_OPT});
     push(@ARGV, @libs);
@@ -52,7 +53,7 @@ DEATH
     system($^X, '-MCPAN', '-e',
       'my $done; require ExtUtils::MakeMaker;
        my $orig = ExtUtils::MakeMaker->can("prompt");
-       *ExtUtils::MakeMaker::prompt = sub {
+       *ExtUtils::MakeMaker::prompt = sub ($;$) {
          if (!$done && $_[0] =~ /manual configuration/) {
            $done++;
            return "no";
@@ -107,8 +108,10 @@ requires 'CPAN' => '1.80'; # sudo support
 # without this beautiful hack
 
 my $no_cpanplus_env = !exists $ENV{PERL5_CPANPLUS_IS_RUNNING};
+my $no_cpan_env = !exists $ENV{PERL5_CPAN_IS_RUNNING};
 require CPAN;
 delete $ENV{PERL5_CPANPLUS_IS_RUNNING} if $no_cpanplus_env;
+delete $ENV{PERL5_CPAN_IS_RUNNING} if $no_cpan_env;
 
 # and make sure that the user doesn't have any existing CPAN config that'll
 # cause us problems for the next few steps.