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

πŸ’– TAP::Parser::SourceHandler::Handle β€” the manual, but make it cute πŸ’–

okay so bestie, welcome to TAP::P...Handle(3perl), the TAP::Parser::SourceHandler::Handle page from the Perl Programmers Reference Guide. she's a tiny lil module with one specific job and she does it flawlessly, no notes. πŸ’…


✨ VERSION ✨

Version 3.52 β€” she's current, she's thriving. πŸŽ€


🌸 SYNOPSIS 🌸

use TAP::Parser::Source;
use TAP::Parser::SourceHandler::Executable;

my $source = TAP::Parser::Source->new->raw( \*TAP_FILE );
$source->assemble_meta;

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

like, this is the whole vibe. create your source, assemble the meta, ask the class what it thinks, get your iterator. periodt. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So this class is a raw TAP stored in an IO Handle TAP::Parser::SourceHandler. It has exactly 2 jobs and honestly? she's booked and busy with them:

  1. Figure out if the TAP::Parser::Source it's given is an IO::Handle or a GLOB containing raw TAP output (that's the can_handle job, we love her).
  2. Creates an iterator for IO::Handle's & globs (that's make_iterator, the main character of the operation).
ngl, unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly. it's giving internals, bestie. she's there when you need her and she stays in her lane. 🫢

πŸ’… METHODS πŸ’…

✨ Class Methods ✨

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

Casts the following votes β€” like a lil opinion poll but make it TAP:

0.9 if $source is an IO::Handle
0.8 if $source is a glob

so if it's an IO::Handle she's very confident (0.9 🫑), and if it's a glob she's still pretty into it (0.8 😌). vibe check passed either way.


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

Returns a new TAP::Parser::Iterator::Stream for the source. that's it, that's the tea. πŸ“


  • iterator_class

The class of iterator to use β€” override this if you're sub-classing, bestie, it's literally your moment. Defaults to TAP::Parser::Iterator::Stream. πŸ†


πŸ‘‘ SUBCLASSING πŸ‘‘

Please see "SUBCLASSING" in TAP::Parser for a subclassing overview. go read that one, she ate. πŸ’œ


🌈 SEE ALSO 🌈

the whole friend group, fr fr:

  • TAP::Object
  • TAP::Parser
  • TAP::Parser::Iterator
  • TAP::Parser::Iterator::Stream
  • TAP::Parser::IteratorFactory
  • TAP::Parser::SourceHandler
  • TAP::Parser::SourceHandler::Executable
  • TAP::Parser::SourceHandler::Perl
  • TAP::Parser::SourceHandler::File
  • TAP::Parser::SourceHandler::RawTAP

and that's the whole page, bestie!! πŸ’– this was perl v5.44.0, dated 2026-10-17, filed under TAP::P...Handle(3perl) β€” stan her, she's iconic and she knows exactly which handle she's streaming. πŸ‘‘βœ¨πŸ¦‹

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