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};
Test::Harness honors HARNESS_VERBOSE but does not set it. prove sets TEST_VERBOSE when -v is set. Both set $Test::Harness::verbose however your test cannot see that since its running in an exec'd subprocess. prove and TH should unify how they indicate to a subprocess that they are running verbose. Given that Test::Harness already uses HARNESS_ACTIVE to indicate to running tests that they are running under Test::Harness it and prove should continue to use the HARNESS_ prefix for their environment variables. So... Test::Harness and prove should both set HARNESS_VERBOSE=1 when running verbose.