It looks like some of the TAP::Harness
(v3.23) constructor args don't like to play together.
When I try to specify the formatter
arg along with verbosity
or color
args, the module complains about the latter two being unrecognized. When I comment it out, it works just fine. Am I doing something wrong?
use strict;
use warnings;
use TAP::Harness;
use TAP::Formatter::HTML;
print "TAP::Harness Version : $TAP::Harness::VERSION\n"; # 3.23
my $fmt = TAP::Formatter::HTML->new;
$fmt->output_file( 'test.html' );
my $harness = TAP::Harness
->new( {
color => 1,
verbosity => -2,
formatter => $fmt,
lib => $^O =~ /win/i
? [ 'C:\\some\\lib' ]
: [ '/usr/bin/etc/some/lib' ],
} );
OUTPUT (with formatter
arg specified):
Unknown arguments to TAP::Harness::new (color verbosity) at harness.pl line 41
So it looks like
TAP::Formatter::HTML
has its ownverbosity
andcolor
properties:So the arguments need to be passed to the
TAP::Formatter::HTML
object and not the harness.