TEST2::FORMATTER::TAP(3perl)
β¨ NAME β¨
Test2::Formatter::TAP β the Standard TAP formatter, bestie π
π¦ DESCRIPTION π¦
Okay so this is the thing that takes your events and turns them into TAP. That's it. That's the whole job. It's giving translator, it's giving glow-up for your test output. β¨
πΈ SYNOPSIS πΈ
use Test2::Formatter::TAP;
my $tap = Test2::Formatter::TAP->new();
# Switch to utf8
$tap->encoding('utf8');
$tap->write($event, $number); # Output an event
π METHODS π
$bool = $tap->no_numbers$tap->set_no_numbers($bool)
Use this to turn the numbers on and off. Little toggle moment, we love a switch. ποΈ
$arrayref = $tap->handles$tap->set_handles(\@handles);
Can be used to get/set the filehandles. The indexes are identified by the OUT_STD and OUT_ERR constants β so like, if you're lost, those constants are your map. πΊοΈ
$encoding = $tap->encoding$tap->encoding($encoding)
Get or set the encoding. By default no encoding is set, and the original settings of STDOUT and STDERR are used.
Heads up bestie: this directly modifies the stored filehandles. It does not create new ones. No new filehandles were harmed in the making of this encoding. π
$tap->write($e, $num)
Write an event to the console. Slay. π
π SOURCE π
The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>.
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π«Ά AUTHORS π«Ά
Chad Granum <exodist@cpan.org>
Kent Fredric <kentnl@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <https://dev.perl.org/licenses/>
That's the whole page, periodt. π Brought to you by perl v5.44.0, dated 2026-10-17 β no cap, fr fr. ππ§
π¦ 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