On Thu, Apr 28, 2005 at 02:44:30PM +0100, Adrian Howard wrote: > On 28 Apr 2005, at 14:23, Paul Johnson wrote: > > >Using Test::More, I would like to send some diagnostics to be seen only > >when the harness is running in verbose mode. > [snip] > > diag "some verbose diagnostics" if $ENV{TEST_VERBOSE};
I didn't think that would work with prove, but it looks like Andy fixed that before it was a problem. Based on a suggestion from Geoff Young, I came up with: sub vdiag { my $original_fh = Test::Builder->failure_output; Test::Builder->failure_output(\*Test::Builder::TESTOUT); diag(@_); Test::Builder->failure_output($original_fh); } but your suggestion is simpler. Thanks! -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net