Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 74393
Status: open
Priority: 0/
Queue: Test-Harness

Owner: Nobody in particular
Requestors: steve [...]

Bug Information
Severity: Normal
Broken in:
  • 3.18
  • 3.19
  • 3.20
  • 3.21
  • 3.22
  • 3.23
Fixed in: (no value)

Subject: Bug: using M::B to set formatter fails on verbosity attribute
Download (untitled) / with headers
text/plain 1.4k
Hi all, I don't have time to fix this right away, so thought I'd file it: First off, the M::B example given in TAP::Harness breaks: M::B->new( ... use_tap_harness => 1, tap_harness_args => { ... formatter => 'TAP::Formatter::HTML', # this is the problem ... $ ./Build test Unknown arguments to TAP::Harness::new (verbosity) at /usr/local/perl-5.10.1/lib/5.10.1/Module/Build/ line 2738 The fix is to update the docs: ... formatter_class => 'TAP::Formatter::HTML', But this does raise an issue: TAP::Harness::_initialize() doesn't actually accept a 'verbosity' attribute for itself, it's passed on to the formatter it creates. But if a valid formatter is passed it doesn't even look at any of these arguments. This will cause M::B & others to break as above. This is a problem of documentation & design... The docs for T::H->new say: my %args = ( verbosity => 1, lib => [ 'lib', 'blib/lib', 'blib/arch' ], ) my $harness = TAP::Harness->new( \%args ); So we could: 1. update the docs to say 'only pass formatter args if you've not passed a formatter' (confusing) 2. always set formatter args if they're passed to _initialize() with a formatter object (ie: override args set in the formatter) 3. delete any unused formatter args (black hole: confusing?) 4. redesign so this can't happen (a lot of work?) -Steve
Download (untitled) / with headers
text/plain 250b
On Wed Jan 25 15:52:12 2012, SPURKIS wrote: Show quoted text
> The fix is to update the docs: > ... > formatter_class => 'TAP::Formatter::HTML',
As a temporary solution, I've pushed this fix to master. The full fix needs some discussion. -Steve

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to