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:
- Figure out if the
TAP::Parser::Sourceit's given is anIO::Handleor aGLOBcontaining raw TAP output (that's thecan_handlejob, we love her). - Creates an iterator for
IO::Handle's & globs (that'smake_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::ObjectTAP::ParserTAP::Parser::IteratorTAP::Parser::Iterator::StreamTAP::Parser::IteratorFactoryTAP::Parser::SourceHandlerTAP::Parser::SourceHandler::ExecutableTAP::Parser::SourceHandler::PerlTAP::Parser::SourceHandler::FileTAP::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