Test::S...er::TAP(3)

πŸ“¦
version 1.302027 Β· 2 versions
, in fedora 43

πŸ’… NAME

Test::Stream::Formatter::TAP β€” the standard TAP formatter, bestie. That's it, that's the whole vibe.


🚨 DEPRECATED 🚨

Okay so listen. This whole distribution is deprecated. Like, it's been replaced by Test2, Test2::Suite, and Test2::Workflow. It's giving "we still love you but you gotta move on."

If you need to migrate, go read Test::Stream::Manual::ToTest2 β€” it's literally a whole conversion guide, slay.


✨ DESCRIPTION ✨

This is the thing that catches events and turns them into TAP. That's the job. That's the assignment. Periodt.


πŸŽ€ SYNOPSIS πŸŽ€

use Test::Stream::Formatter::TAP;
my $tap = Test::Stream::Formatter::TAP->new();

# Switch to utf8
$tap->encoding('utf8');

$tap->write($event, $number); # Output an event

🫢 EXPORTS 🫢

  • OUT_STD
  • OUT_ERR
  • OUT_TODO

These are constants that name which filehandle is which, okay? Events use them to send text to the right filehandle. Very demure, very mindful, very "text goes where it belongs."


πŸ’– METHODS πŸ’–

  • $bool = $tap->no_numbers
  • $tap->set_no_numbers($bool)

Turns the numbers on and off. That's it. That's the whole thing.

  • $bool = $tap->no_header($bool)
  • $tap->set_no_header($bool)

When this is true, the plan will not be rendered. No plan, no problem πŸ’€

  • $bool = $tap->no_diag
  • $tap->set_no_diag($bool)

When this is true, diagnostics will not be rendered. They simply do not make the cut.

  • $arrayref = $tap->handles
  • $tap->set_handles(\@handles);

You can get or set the filehandles with this. The indexes are identified by the OUT_STD, OUT_ERR, and OUT_TODO constants. Iykyk.

  • $encoding = $tap->encoding
  • $tap->encoding($encoding)

Get or set the encoding. By default no encoding is set, so 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 birthed in the making of this encoding change, fr fr.
  • $tap->write($e, $num)

Writes an event to the console. Iconic behaviour, honestly.


🌈 SOURCE 🌈

The source code repository for Test::Stream lives at http://github.com/Test-More/Test-Stream/. Go be nosy, you're welcome.


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

🌸 AUTHORS 🌸

  • Chad Granum <exodist@cpan.org>
  • Kent Fredric <kentnl@cpan.org>

Copyright 2015 Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/


And that's a wrap, babe πŸ¦‹ this was Test::S...er::TAP(3) from the User Contributed Perl Documentation girlies, running on perl v5.42.0, dated 2025-07-25. Go forth and format your TAP πŸ’œ

πŸ“¦ where this page comes from