TAP::Harness::Env(3pm) Perl Programmers Reference Guide TAP::Harness::Env(3pm)

# [NAME](#NAME)

TAP::Harness::Env - Parsing harness related environmental variables where appropriate

# [VERSION](#VERSION)

Version 3.52

# [SYNOPSIS](#SYNOPSIS)

```
 my $harness = TAP::Harness::Env->create(\%extra_args)
```

# [DESCRIPTION](#DESCRIPTION)

This module implements the environmental variables that Test::Harness uses with TAP::Harness, and instantiates the appropriate class with the appropriate arguments.

# [METHODS](#METHODS)

•

create( \\%args )

This function reads the environment and generates an appropriate argument hash from it. If given any arguments in %extra\_args, these will override the environmental defaults. In accepts "harness\_class" (which defaults to "TAP::Harness"), and any argument the harness class accepts.

# [ENVIRONMENTAL VARIABLES](#ENVIRONMENTAL_VARIABLES)

"HARNESS\_PERL\_SWITCHES"

Setting this adds perl command line switches to each test file run.

For example, "HARNESS\_PERL\_SWITCHES=-T" will turn on taint mode. "HARNESS\_PERL\_SWITCHES=-MDevel::Cover" will run "Devel::Cover" for each test.

"HARNESS\_VERBOSE"

If true, "TAP::Harness" will output the verbose results of running its tests.

"HARNESS\_SUBCLASS"

Specifies a TAP::Harness subclass to be used in place of TAP::Harness.

"HARNESS\_OPTIONS"

Provide additional options to the harness. Currently supported options are:

"j&lt;n&gt;"

Run &lt;n&gt; (default 9) parallel jobs.

"c"

Try to color output. See "new" in TAP::Formatter::Base.

"a&lt;file.tgz&gt;"

Will use TAP::Harness::Archive as the harness class, and save the TAP to "file.tgz"

"fPackage-With-Dashes"

Set the formatter\_class of the harness being run. Since the "HARNESS\_OPTIONS" is separated by ":", we use "-" instead.

Multiple options may be separated by colons:

```
    HARNESS_OPTIONS=j9:c make test
```

"HARNESS\_TIMER"

Setting this to true will make the harness display the number of milliseconds each test took. You can also use *prove*'s "--timer" switch.

"HARNESS\_COLOR"

Attempt to produce color output.

"HARNESS\_IGNORE\_EXIT"

If set to a true value instruct "TAP::Parser" to ignore exit and wait status from test scripts.

2026-10-21 perl v5.44.0

---

Document: TAP::Harness::Env(3pm) from perl 5.44.0-r2 (Chainguard OS)
Source: https://github.com/Perl/perl5.git
