TAP::Pa...:RawTAP(3pm)

πŸ’… NAME πŸ’…

Bestie, meet TAP::Parser::SourceHandler::RawTAP β€” the handler that streams output from raw TAP living in a scalar/array ref. This page comes from the Perl Programmers Reference Guide, and the header is out here calling it TAP::Pa...:RawTAP(3pm) (truncated-name realness, iykyk). πŸ¦‹


πŸŽ€ VERSION πŸŽ€

Version 3.50 β€” slay. ✨


🌈 SYNOPSIS 🌈

Okay so here's the code vibe, bestie:

  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 );

πŸ¦‹ DESCRIPTION πŸ¦‹

This is a raw TAP output TAP::Parser::SourceHandler β€” it has 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).

Unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly β€” lowkey it's a behind-the-scenes icon. πŸ’…


✨ METHODS ✨

🌟 Class Methods 🌟

πŸ’– can_handle πŸ’–

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

It only votes when $source is an array, or a scalar with newlines. Here's the vote lineup, no cap:

  • 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

🫢 make_iterator 🫢

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

Returns a new TAP::Parser::Iterator::Array for the source. Heads up: $source->raw must be an array ref, or a scalar ref. ✨

It croaks on error β€” dramatic but fair. 😭


🧚 SUBCLASSING 🧚

Please see the SUBCLASSING section in TAP::Parser for a subclassing overview, bestie. πŸ’œ


πŸ‘‘ 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

mwah πŸ’‹ footer tea for the record: source/version perl v5.42.3, dated 2026-11-03, page TAP::Pa...:RawTAP(3pm). Bye bestie, go stream that raw TAP! πŸŽ€

πŸ“¦ where this page comes from