Re: [Module::Build] Capturing test output to please CPANPLUS
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <ml...@th...> - 2006-04-10 06:46:42
|
Randy W. Sims wrote: > > 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? Regarding Ticket #9793 [1] Scratch that. I don't really like my previous solution. I'm not sure Module::Build needs to be responsible for capturing output; I can't really see any benifit. Is there a reason CPANPLUS (or CPANPLUS::Dist::Build) can't do this, like below (borrowing again from Jos' patch), or are there other issues I'm not aware of? Thanks, Randy. use strict; use warnings; use Module::Build; my $mb = Module::Build->new_from_context; $mb->dispatch('build'); my $out = ''; { require IO::String; local *STDOUT; my $io = tie( *STDOUT, 'IO::String' ); eval { $mb->dispatch('test') }; $out = $io->string_ref; } print $$out; die $@ if $@; 1. <http://rt.cpan.org/Public/Bug/Display.html?id=9793> |