TAP::P...RawTAP(3perl)

πŸ’– TAP::Parser::SourceHandler::RawTAP πŸ’–

okay bestie, welcome to the lil module that streams raw TAP output straight out of a scalar or an array ref πŸŽ€ it lives in the Perl Programmers Reference Guide and it's genuinely iconic, no cap.

Version 3.52 β€” yeah, that's the one. ✨


🌈 SYNOPSIS 🌈

use TAP::Parser::Source;
use TAP::Parser::SourceHandler::RawTAP;

my $source = TAP::Parser::Source->new->raw( \"1..1\nok 1\n" );
$source->assemble_meta;

my $class = 'TAP::Parser::SourceHandler::RawTAP';
my $vote  = $class->can_handle( $source );
my $iter  = $class->make_iterator( $source );

like, copy it, paste it, slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this is a raw TAP output TAP::Parser::SourceHandler, and the way that it has literally exactly 2 jobs:

  1. Figure out if the TAP::Parser::Source it's given is raw TAP output ("can_handle").
  2. Creates an iterator for raw TAP output ("make_iterator").

and that's the whole personality. πŸ’€

ngl though β€” unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly. lowkey it's doing its own thing in the background. 🫢


πŸ‘‘ METHODS πŸ‘‘

✨ Class Methods ✨

"can_handle" πŸŽ€

my $vote = $class->can_handle( $source );

Only votes if $source is an array, or a scalar with newlines. Casts the following votes:

  • 0.9 β€” if it's a scalar with '..' in it
  • 0.7 β€” if it's a scalar with 'ok' in it
  • 0.3 β€” if it's just a scalar with newlines
  • 0.5 β€” if it's an array

the vibes-based scoring system fr fr, it's giving ✨democracy✨

"make_iterator" πŸ¦‹

my $iterator = $class->make_iterator( $source );

Returns a new TAP::Parser::Iterator::Array for the source. "$source->raw" must be an array ref, or a scalar ref. πŸ’–

it "croak"s on error. 😭 so like, handle that.


🌸 SUBCLASSING 🌸

Please see "SUBCLASSING" in TAP::Parser for a subclassing overview. go read it bestie, it's worth it. πŸ“–


⭐ SEE ALSO ⭐

  • TAP::Object
  • TAP::Parser
  • TAP::Parser::IteratorFactory
  • TAP::Parser::SourceHandler
  • TAP::Parser::SourceHandler::Executable
  • TAP::Parser::SourceHandler::Perl
  • TAP::Parser::SourceHandler::File
  • TAP::Parser::SourceHandler::Handle

the whole friend group 🫢


and that's the page, bestie!! this whole thing came to you courtesy of perl v5.44.0, dated 2026-10-17, on the TAP::P...RawTAP(3perl) page. mwah πŸ’‹ go forth and parse, main character πŸ’…βœ¨

πŸ“¦ 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