[Module::Build] Capturing test output to please CPANPLUS
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2006-04-08 21:02:43
|
Will something like this work for a temporary solution that we can maybe
figure out how to extend in the future to always capture output?
It can be driven like so:
use Module::Build;
my $mb = Module::Build->new_from_context;
$mb->dispatch('build');
$ENV{PERL_MM_USE_DEFAULT} = 1; # or $ENV{PERL5_CPANPLUS_IS_RUNNING} = 1
eval{ $mb->dispatch('test') };
if ( $mb->test_captured ) {
my $out = $mb->test_out;
my $err = $mb->test_err;
print <<"---";
output:
=======
$out
errors:
=======
$err
---
}
|