Author: dagolden
Date: Sun Feb  8 14:34:24 2009
New Revision: 12485

Modified:
   Module-Build/trunk/   (props changed)
   Module-Build/trunk/Build.PL
   Module-Build/trunk/Changes
   Module-Build/trunk/t/lib/DistGen.pm

Log:
adds 'allow_mb_mismatch' when running under CPANPLUS; allows self-upgrading
in CPANPLUS::Dist::Build. Committed so we can see it tested by CPAN Testers;
will revert if it causes more trouble than it solves


Modified: Module-Build/trunk/Build.PL
==============================================================================
--- Module-Build/trunk/Build.PL (original)
+++ Module-Build/trunk/Build.PL Sun Feb  8 14:34:24 2009
@@ -59,6 +59,13 @@
 
   # overwrite the M::B that shipped in core
   installdirs   => ($] >= 5.009004 ? 'core' : 'site'),
+  
+  # Some CPANPLUS::Dist::Build versions need to allow mismatches 
+  # On logic: thanks to Module::Install, CPAN.pm must set both keys, but
+  # CPANPLUS sets only the one
+  allow_mb_mismatch => ( 
+    $ENV{PERL5_CPANPLUS_IS_RUNNING} && ! $ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0
+  ),
 
   auto_features => {
     YAML_support => {

Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes  (original)
+++ Module-Build/trunk/Changes  Sun Feb  8 14:34:24 2009
@@ -10,7 +10,9 @@
  Bug-fixes
  - 'fakeinstall' action warns and skips without ExtUtils::Install 1.32+
    [David Golden, reported by Zefram]
-   
+ - allows Module::Build version mismatch when installing self; works around
+   limitations in CPANPLUS::Dist::Build [David Golden]
+
 0.31_02 - Tue Jan 27 09:16:43 PST 2009
 
  Other

Modified: Module-Build/trunk/t/lib/DistGen.pm
==============================================================================
--- Module-Build/trunk/t/lib/DistGen.pm (original)
+++ Module-Build/trunk/t/lib/DistGen.pm Sun Feb  8 14:34:24 2009
@@ -405,6 +405,12 @@
     use strict;
     use Module::Build;
     my \$b = Module::Build->new(
+    # Some CPANPLUS::Dist::Build versions need to allow mismatches 
+    # On logic: thanks to Module::Install, CPAN.pm must set both keys, but
+    # CPANPLUS sets only the one
+    allow_mb_mismatch => ( 
+      \$ENV{PERL5_CPANPLUS_IS_RUNNING} && ! \$ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0
+    ),
     $args
     );
     \$b->create_build_script();

Reply via email to