Author: kwilliams
Date: Fri Aug  4 20:06:47 2006
New Revision: 6747

Modified:
   CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
   CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t

Log:
Apply Jos' cleanup patch for my last bungling

Modified: CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
==============================================================================
--- CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm        (original)
+++ CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm        Fri Aug  4 
20:06:47 2006
@@ -522,6 +522,10 @@
             if( $@ ) {
                 error(loc("Could not run '%1': %2", 'Build test', "$@"));
 
+                ### mark specifically *test* failure.. so we dont
+                ### send success on force...
+                $test_fail++;
+
                 unless($force) {
                     $dist->status->test(0);
                     $fail++; last RUN;
@@ -585,8 +589,7 @@
                          store   => \$verbose },
             force   => { default => $conf->get_conf('force'),
                          store   => \$force },
-            perl    => { default => $conf->get_program('perl') || $^X,
-                         store   => \$perl },
+            perl    => { default => $^X, store   => \$perl },
         };
     
         my $args = check( $tmpl, \%hash ) or return;
@@ -595,10 +598,6 @@
 
     my $dir;
     unless( $dir = $self->status->extract ) {
-                ### mark specifically *test* failure.. so we dont
-                ### send success on force...
-                $test_fail++;
-                
         error( loc( "No dir found to operate on!" ) );
         return;
     }

Modified: CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t
==============================================================================
--- CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t        (original)
+++ CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t        Fri Aug  4 
20:06:47 2006
@@ -38,19 +38,15 @@
 my $Lib     = File::Spec->rel2abs(File::Spec->catdir( qw[dummy-perl] ));
 my $Src     = File::Spec->rel2abs(File::Spec->catdir( qw[src] ));
 
-
 my $Verbose = @ARGV ? 1 : 0;
-my $Conf    = CPANPLUS::Configure->new( 
-                conf => {   
-                    base        => 'dummy-cpanplus',   
-                    dist_type   => '',
-                    verbose     => $Verbose,
-                    ### running tests will mess with the test output 
-                    ### counter so skip 'm
-                    skiptest    => 1,
-                } );
+my $CB      = CPANPLUS::Backend->new;
+my $Conf    = $CB->configure_object;
 
-my $CB      = CPANPLUS::Backend->new( $Conf );
+$Conf->set_conf( base       => 'dummy-cpanplus' );
+$Conf->set_conf( dist_type  => '' );
+$Conf->set_conf( verbose    => $Verbose );
+### running tests will mess with the test output so skip 'm
+$Conf->set_conf( skiptest   => 1 );
 
                 # path, cc needed?
 my %Map     = ( noxs    => 0,
@@ -69,7 +65,7 @@
     $Conf->set_conf( cpantest => 0 );
     
     ### we dont need sudo -- we're installing in our own sandbox now
-    $Conf->set_program( sudo => '' );
+    $Conf->set_program( sudo => undef );
 }
 
 use_ok( $Class );
@@ -120,6 +116,9 @@
     SKIP: {
         skip("The CC compiler listed in Config.pm is not available " .
              "-- skipping compile tests", 5) if $need_cc && !$Have_CC;
+        skip("Module::Build is not compiled with C support ".
+             "-- skipping compile tests", 5) 
+             unless Module::Build->_mb_feature('C_support');
 
         ok( $mod->create( ),    "Creating module" );
         ok( $mod->status->dist_cpan->status->created,

Reply via email to