TAP::P...::File(3perl)
π TAP::Parser::SourceHandler::File π
okay bestie so this is TAP::Parser::SourceHandler::File β the little handler that streams TAP from a text file. That's the whole vibe. It's the TAP::Parser::SourceHandler::File module, and its version? Version 3.52. periodt. π
No no wait, that's the VERSION bit, let me not skip anything, here's the actual order of things:
β¨ VERSION β¨
Version 3.52 β yes she's grown up, she has a version number, we stan. π
πΈ SYNOPSIS πΈ
okay so here's literally how you use her, copy-paste and go:
use TAP::Parser::Source;
use TAP::Parser::SourceHandler::File;
my $source = TAP::Parser::Source->new->raw( \'file.tap' );
$source->assemble_meta;
my $class = 'TAP::Parser::SourceHandler::File';
my $vote = $class->can_handle( $source );
my $iter = $class->make_iterator( $source );
look at her go β¨ $vote and $iter, one to decide, one to deliver. main character energy fr fr.
π¦ DESCRIPTION π¦
okay so this module is a raw TAP stored in a file TAP::Parser::SourceHandler, which is just a fancy way of saying she has exactly 2 jobs, and she does both flawlessly:
- She figures out whether the raw source you handed her is actually a file containing raw TAP output. (The receipts live in
TAP::Parser::IteratorFactoryif you want the whole story β go read that for more details, bestie.) - She takes that raw TAP out of the text file you gave her and converts it into an iterator. slay.
real talk though: unless you're out here writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly. She's backstage crew, not the opening act. π
π METHODS π
π§ Class Methods π§
can_handle
my $vote = $class->can_handle( $source );
So this method only casts a vote if $source looks like a regular file. Like, she's not gonna vote for something that isn't giving file. And when she does vote, here's what she casts:
0.9if it's a.tapfile π0.9if it has an extension matching any given in user config π
a strong 0.9 both times, she doesn't do half measures, no cap.
make_iterator
my $iterator = $class->make_iterator( $source );
Returns a new TAP::Parser::Iterator::Stream for the source. (Cute!) And if something goes wrong? She croaks on error. π like genuinely, croak, not a gentle "oops" β she will let you know.
iterator_class
This is the class of iterator to use β override it if you're sub-classing, bestie, go off. It defaults to TAP::Parser::Iterator::Stream.
π CONFIGURATION π
here's the shape of the config hash, exactly:
{
extensions => [ @case_insensitive_exts_to_match ]
}
yep. extensions. case-insensitive. matches. that's the whole thing. π
π SUBCLASSING π
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview. (go look, it's all there, iykyk π¦)
β SEE ALSO β
TAP::ObjectTAP::ParserTAP::Parser::SourceHandlerTAP::Parser::SourceHandler::ExecutableTAP::Parser::SourceHandler::PerlTAP::Parser::SourceHandler::HandleTAP::Parser::SourceHandler::RawTAP
the whole friend group, honestly. obsessed. π«Ά
and that's the page!! this was perl v5.44.0 doing her thing back on 2026-10-17, and honestly? iconic. take care of her, she streams TAP from text files and she does it beautifully. bye bestie πβ¨πΈ
π¦ 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