Re: [Module-build-general] verbose and Test::Harness
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2002-10-29 23:31:28
|
Heya,
I'm about to apply a form of this patch. I want to make sure I
understand it.
On Friday, August 23, 2002, at 12:10 PM, Dave Rolsky wrote:
> There's a number of different versions of Test::Harness out there, and
> at
> least with the one installed on my system (2.24), "Build test verbose=1"
> does not actually lead to verbose output. This patch fixes that while
> still preserving the old code, which presumably works with some versions
> of Test::Harness.
Yeah, "Build test verbose=1" produces verbose output for me. Someone
else told me that it didn't for them, though, so I know you're not alone.
>
> This also does the same thing for test 'switches', on the theory that it
> can't hurt. I'm not really sure how to test this.
One sort of ugly way would be to invoke a 'Build test verbose=1' process
and see whether it really is verbose. Or we could isolate the code that
generates the Test::Harness verbosity options, and test that it works by
sending those options directly to a Test::Harness process. That would
be better. Maybe it wouldn't even require a subprocess?
> diff -wru ../Module-Build-0.11/lib/Module/Build/Base.pm
> ./lib/Module/Build/Base.pm
> --- ../Module-Build-0.11/lib/Module/Build/Base.pm 2002-08-24
> 00:58:27.000000000 +0800
> +++ ./lib/Module/Build/Base.pm 2002-08-24 01:08:10.000000000 +0800
> @@ -563,9 +563,16 @@
>
> $self->depends_on('build');
>
> - local $Test::Harness::switches = '-w -d' if
> $self->{properties}{debugger};
> - local $Test::Harness::verbose = $self->{properties}{verbose} || 0;
> - local $ENV{TEST_VERBOSE} = $self->{properties}{verbose} || 0;
> + local ($Test::Harness::switches,
> + $Test::Harness::Switches,
> + $ENV{HARNESS_PERL_SWITCHES}) = ('-w -d') x 2
> + if $self->{properties}{debugger};
Should be 'x 3', right?
> +
> + my $verbose = $self->{properties}{verbose} || 0;
> +
> + local ($Test::Harness::verbose,
> + $Test::Harness::Verbose,
> + $ENV{TEST_VERBOSE},
> + $ENV{HARNESS_VERBOSE}) = ($verbose) x 4;
So, your version of Test::Harness uses $Verbose instead of $verbose?
I'm looking at T::H version 1.1604, which exports $verbose.
Where are the HARNESS_VERBOSE and HARNESS_PERL_SWITCHES variables used?
I can't find 'em in my @INC.
-Ken
|