TAP::Harness::Env(3pm)

🌸 TAP::Harness::Env(3pm) 🌸

okay bestie, welcome to TAP::Harness::Env(3pm) from the Perl Programmers Reference Guide β€” it's giving environment-variable parser for your harness, and yes it's iconic for that. ✨

πŸŽ€ NAME πŸŽ€

TAP::Harness::Env β€” parsing harness related environmental variables where appropriate πŸ’…

πŸ’– VERSION πŸ’–

Version 3.50 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

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

🌈 DESCRIPTION 🌈

This module implements the environmental variables that Test::Harness uses with TAP::Harness, and instantiates the appropriate class with the appropriate arguments. No cap: it's the little env-var matchmaker. πŸ’–

🌟 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. It accepts "harness_class" (which defaults to "TAP::Harness"), and any argument the harness class accepts. Slay. πŸ’…

✨ 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 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. πŸ™ˆ

okay that's the whole vibe check πŸ’… β€” this page came from perl v5.42.3, dated 2026-11-03, and it's TAP::Harness::Env(3pm) signing off 🫢✨

πŸ“¦ where this page comes from