TAP::FORMATTER::COLOR(3perl)
π TAP::Formatter::Color π
okay bestie, gather round, because this is the manual page for TAP::Formatter::Color β the little Perl module that runs your test scripts with color. yes, actual color. in a terminal. we love to see it. π
β¨ VERSION β¨
Version 3.52 β she's serving us the 3.52 era, no notes. π
πΈ DESCRIPTION πΈ
okay so first things first, and I need you to hear me on this: this harness is experimental. like, genuinely. the author (hi bestie, we see you) says you may not like the colors they picked and β this is the part that hurts β there is not yet an easy way to override them. so it's giving "trust the process", it's giving "the colors are the colors". π
Functionally? This test harness is the same as TAP::Harness, bestie. Exact same vibes. The one difference is that test results come out in color. Here's the whole palette, memorize it:
- Passing tests are printed in green β slay
- Failing tests are in red π (as they should be)
- Skipped tests are blue on a white background π¦
- TODO tests are printed in white π€
And the graceful-fallback moment: if Term::ANSIColor cannot be found β and also Win32::Console::ANSI if you're running under Windows β then the tests will just be run without color. No crash, no drama, just monochrome. we cope. π
π SYNOPSIS π
here's the vibe in code form, copy it exactly bestie:
use TAP::Formatter::Color;
my $harness = TAP::Formatter::Color->new( \%args );
$harness->runtests(@tests);
like, that's it. that's the whole ritual. β¨
π«Ά METHODS π«Ά
π Class Methods
newβ the constructor, and she returns a fresh newTAP::Formatter::Colorobject for you. π but heads up: ifTerm::ANSIColoris not installed, she returnsundef. no object, no vibes, nothing.can_colorβ called like this:
Test::Formatter::Color->can_color()
Returns a boolean telling you whether this module can actually generate colored output right now. This will be false if it couldn't load the modules needed for your current platform. so like, a little vibe check before you commit. β
set_colorβ Set the output color. that's the whole job, and she does it. π
ngl, the "experimental, and you can't override the colors yet" thing is the main character twist of this whole page. go in with your eyes open, bestie. π
that's the whole page, fr fr. π§
this was TAP::Formatter::Color, page 3perl, from perl v5.44.0, dated 2026-10-17. mwah, take care of her, and go make those tests pretty. πΈπβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms