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:

  1. She figures out whether the raw source you handed her is actually a file containing raw TAP output. (The receipts live in TAP::Parser::IteratorFactory if you want the whole story β€” go read that for more details, bestie.)
  2. 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.9 if it's a .tap file πŸ“
  • 0.9 if 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::Object
  • TAP::Parser
  • TAP::Parser::SourceHandler
  • TAP::Parser::SourceHandler::Executable
  • TAP::Parser::SourceHandler::Perl
  • TAP::Parser::SourceHandler::Handle
  • TAP::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