Killing CPANPLUS

Andy Armstrong andy at hexten.net
Sun Sep 14 11:21:57 UTC 2008


Per this report:

http://rt.cpan.org/Ticket/Display.html?id=39257

When CPANPLUS is configured to use Module::Build we cause cpanp to  
exit after our tests have run. This is because cpanp runs M::B tests  
in-process and in our inc/MyBuilder.pm we exit after tests have  
completed:

# in inc/MyBuilder.pm
sub ACTION_test {
     my $self = shift;

     $self->depends_on('code');

     my $tests = $self->find_test_files;
     unless (@$tests) {
         $self->log_info("No tests defined.\n");
         return;
     }

     # TODO verbose and stuff

     require TAP::Harness;
     my $harness = TAP::Harness->new( { lib => 'blib/lib' } );
     my $aggregator = $harness->runtests(@$tests);
     exit $aggregator->has_problems ? 1 : 0;
}

I don't think the default Module::Build ACTION_test sets the exit code  
- so presumably we don't need to either.

Eric: svn blame suggests that MyBuilder.pm is yours. Any thoughts on  
whether we can safely lose the exit?

-- 
Andy Armstrong, Hexten





More information about the tapx-dev mailing list