[Bast-commits] r4728 - local-lib/1.000/trunk

matthewt at dev.catalyst.perl.org matthewt at dev.catalyst.perl.org
Mon Aug 4 13:28:23 BST 2008


Author: matthewt
Date: 2008-08-04 13:28:23 +0100 (Mon, 04 Aug 2008)
New Revision: 4728

Modified:
   local-lib/1.000/trunk/Makefile.PL
Log:
make CPAN config reinit automagic

Modified: local-lib/1.000/trunk/Makefile.PL
===================================================================
--- local-lib/1.000/trunk/Makefile.PL	2008-08-03 13:01:26 UTC (rev 4727)
+++ local-lib/1.000/trunk/Makefile.PL	2008-08-04 12:28:23 UTC (rev 4728)
@@ -19,6 +19,7 @@
     local::lib->import(@args);
 
     push(@ARGV,$ENV{PERL_MM_OPT});
+    push(@ARGV, map { "-I$_" } split(':',$ENV{PERL5LIB}));
 
     system($^X, '-MExtUtils::MakeMaker 6.31', '-e1');
     my $eumm = $? >> 8;
@@ -30,10 +31,18 @@
     system($^X, '-MCPAN', '-e',
       'CPAN::Config->load;
        unless (-w $CPAN::Config->{keep_source_where}) {
-         $ENV{PERL_MM_USE_DEFAULT} = 0;
          my $save = $CPAN::Config->{urllist};
          delete @{$CPAN::Config}{keys %$CPAN::Config};
          $CPAN::Config->{urllist} = $save;
+         my $orig = ExtUtils::MakeMaker->can("prompt");
+         my $done;
+         *ExtUtils::MakeMaker::prompt = sub {
+           if (!$done && $_[0] =~ /manual configuration/) {
+             $done++;
+             return "no";
+           }
+           return $orig->(@_);
+         };
          CPAN::Config->init;
        }'
     );




More information about the Bast-commits mailing list