TAP::Formatter::Color(3perl)

TAP::Formatter::Color3perl

Run perl test scripts with color

Usage

 use TAP::Formatter::Color;
 my $harness = TAP::Formatter::Color->new( \%args );
 $harness->runtests(@tests);

Version

Version 3.52

Overview

Note that this harness is experimental. You may not like the colors I've chosen and I haven't yet provided an easy way to override them.

This test harness is the same as TAP::Harness, but test results are output in color. Passing tests are printed in green. Failing tests are in red. Skipped tests are blue on a white background and TODO tests are printed in white.

If Term::ANSIColor cannot be found (and Win32::Console::ANSI if running under Windows) tests will be run without color.

Methods

Class Methods

"new"

The constructor returns a new "TAP::Formatter::Color" object. If Term::ANSIColor is not installed, returns undef.

"can_color"

  Test::Formatter::Color->can_color()

Returns a boolean indicating whether or not this module can actually generate colored output. This will be false if it could not load the modules needed for the current platform.

"set_color"

Set the output color.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 8 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

From perl 5.44.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.