TAP::Parser::SourceHandler::File β Stream TAP from a text file.
| Use Case | Command | Description |
|---|---|---|
| π Check if source is a file | $source->assemble_meta; $class->can_handle($source) | Votes 0.9 for .tap files or matching extensions |
| π¦ Create iterator from file | $class->make_iterator($source) | Returns a TAP::Parser::Iterator::Stream for the file |
| βοΈ Custom iterator class | sub iterator_class { 'My::Iterator' } | Override if subclassing; defaults to TAP::Parser::Iterator::Stream |
Version 3.43
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 );
This is a raw TAP stored in a file TAP::Parser::SourceHandler β it has 2 jobs:
Unless youβre writing a plugin or subclassing TAP::Parser, you probably wonβt need to use this module directly.
can_handle
my $vote = $class->can_handle( $source );
Only votes if $source looks like a regular file. Casts the following votes:
.tap filemake_iterator
my $iterator = $class->make_iterator( $source );
Returns a new TAP::Parser::Iterator::Stream for the source. croaks on error.
iterator_class
The class of iterator to use; override if youβre subclassing. Defaults to TAP::Parser::Iterator::Stream.
{
extensions => [ @case_insensitive_exts_to_match ]
}
Please see βSUBCLASSINGβ in TAP::Parser for a subclassing overview.
perl v5.34.0 β 2026-06-23 β TAP::Parser::SourceHandler::File(3perl)
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 05:35 @216.73.216.138
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format