TAP::Fo...r::Base(3pm)
π NAME π
TAP::Formatter::Base β bestie, this is the base class for harness output delegates. Weβre on the TAP::Formatter::Base(3pm) page, and itβs giving foundational formatter energy π
β¨ VERSION β¨
Version 3.50 β slay.
π¦ DESCRIPTION π¦
Okay so this class provides console-oriented output formatting for TAP::Harness. Thatβs the whole vibe: itβs the base layer that makes harness output look right in your terminal β¨
π SYNOPSIS π
use TAP::Formatter::Console;
my $harness = TAP::Formatter::Console->new( \%args );
π METHODS π
π Class Methods π
π new π
my %args = (
verbose => 1,
)
my $harness = TAP::Formatter::Console->new( \%args );
The constructor returns a new TAP::Formatter::Console object. If a TAP::Harness is created with no formatter, a TAP::Formatter::Console is automatically created. If any of the following options were given to TAP::Harness->new, they get passed along to this constructor, which accepts an optional hashref. The allowed keys are:
verbosityβ Set the verbosity level.verboseβ Printing individual test results toSTDOUT.timerβ Append run time for each test to output. UsesTime::HiResif available.failuresβ Show test failures. This is a no-op ifverboseis selected.commentsβ Show test comments. This is a no-op ifverboseis selected.quietβ Suppressing some test output, mostly failures while tests are running.really_quietβ Suppressing everything but the tests summary.silentβ Suppressing all output.errorsβ If parse errors are found in the TAP output, a note of this will be made in the summary report. To see all of the parse errors, set this argument to true:errors => 1.directivesβ If set to a true value, only test results with directives will be displayed. This overrides other settings such asverbose,failures, orcomments.stdoutβ A filehandle for catching standard output.colorβ If defined, specifies whether color output is desired. Ifcoloris not defined, it will default to color output if color support is available on the current platform and output is not being redirected.jobsβ The number of concurrent jobs this formatter will handle.show_countβ Boolean value. If false, disables the"X/Y"test count which shows up while tests are running.
Bestie note: any keys for which the value is undef will be ignored π«Ά
π§ prepare π§
Called by Test::Harness before any test output is generated.
This is advisory, and it may not be called in the case where tests are being supplied to Test::Harness by an iterator.
π open_test π
Called to create a new test session. A test session looks like this:
my $session = $formatter->open_test( $test, $parser );
while ( defined( my $result = $parser->next ) ) {
$session->result($result);
exit 1 if $result->is_bailout;
}
$session->close_test;
π summary π
$harness->summary( $aggregate );
summary prints the summary report after all tests are run. The first argument is an aggregate to summarise. An optional second argument may be set to a true value to indicate that the summary is being output as a result of an interrupted test run. Iconic summary behavior, no cap π―
byeee π this page is from perl v5.42.3, dated 2026-11-03, and itβs the TAP::Formatter::Base(3pm) manual page. mwah π«Άβ¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms