TAP::Harness::Env(3p)

TAP::Harness::Env3p

Parsing harness related environmental variables where appropriate

Usage

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

Version

Version 3.50

Overview

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

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

"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<n>"

Run <n> (default 9) parallel jobs.

"c"

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

"a<file.tgz>"

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.

Releases

25 releases since OpenBSD 5.7; the text changed 17 times.

  1. 5.7
  2. 5.8–5.9
  3. 6.0
  4. 6.1
  5. 6.2
  6. 6.3–6.4
  7. 6.5
  8. 6.6
  9. 6.7
  10. 6.8
  11. 6.9–7.2
  12. 7.3
  13. 7.4
  14. 7.5
  15. 7.6
  16. 7.7–7.8
  17. 7.9
  18. 8.0

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's man source.