# TAP::Harness::Env - man - phpman

## NAME
    [TAP::Harness::Env](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness%3A%3AEnv/markdown) - Parsing harness related environmental variables where appropriate

## VERSION
    Version 3.43

## SYNOPSIS
     my $harness = [TAP::Harness::Env](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness%3A%3AEnv/markdown)->create(\%extra_args)

## DESCRIPTION
    This module implements the environmental variables that [Test::Harness](https://www.chedong.com/phpMan.php/perldoc/Test%3A%3AHarness/markdown) uses with [TAP::Harness](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown),
    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](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown)"), 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](https://www.chedong.com/phpMan.php/perldoc/MDevel%3A%3ACover/markdown)" will run "[Devel::Cover](https://www.chedong.com/phpMan.php/perldoc/Devel%3A%3ACover/markdown)" for each test.

    "HARNESS_VERBOSE"
        If true, "[TAP::Harness](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown)" will output the verbose results of running its tests.

    "HARNESS_SUBCLASS"
        Specifies a [TAP::Harness](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown) subclass to be used in place of [TAP::Harness](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown).

    "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](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AFormatter%3A%3ABase/markdown).

        "a<file.tgz>"
            Will use [TAP::Harness::Archive](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness%3A%3AArchive/markdown) 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
            seperated 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](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AParser/markdown)" to ignore exit and wait status from test
        scripts.

