TAP::P...utable(3perl)
πΈ TAP::Parser::SourceHandler::Executable πΈ
okay bestie, welcome to the perl manual β this page is TAP::Parser::SourceHandler::Executable(3perl) from the Perl Programmers Reference Guide, and it's genuinely such a vibe. it's the little handler that goes "oh you wanna run an actual program and read its TAP output? say less." π«Ά
β¨ NAME β¨
TAP::Parser::SourceHandler::Executable β stream output from an executable TAP source. it's giving middle-manager-for-your-shell-scripts. iconic. π
π VERSION π
Version 3.52 β yes she's got a number, she's official.
π¦ SYNOPSIS π¦
use TAP::Parser::Source;
use TAP::Parser::SourceHandler::Executable;
my $source = TAP::Parser::Source->new->raw(['/usr/bin/ruby', 'mytest.rb']);
$source->assemble_meta;
my $class = 'TAP::Parser::SourceHandler::Executable';
my $vote = $class->can_handle( $source );
my $iter = $class->make_iterator( $source );
look at her. three little lines and a whole workflow. no cap. β¨
π DESCRIPTION π
so this is an executable TAP::Parser::SourceHandler, and she has exactly two jobs. two. not three. she's very focused and honestly? respect. π
- figure out if the
TAP::Parser::Sourceshe got handed is an executable command β that'scan_handle. - create an iterator for executable commands β that's
make_iterator.
lowkey important: unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly. so if you're just vibing with test output, this is not your girl. she's backstage crew. π
β METHODS β
π Class Methods π
can_handle
my $vote = $class->can_handle( $source );
she only votes if $source looks like an executable file. like, she's not out here voting on everything, she has standards. π
the votes she casts:
0.9β if it's a hash with an'exec'key0.8β if it's a.batfile0.75β if it's got an execute bit set
fr fr, that's the whole ballot.
make_iterator
my $iterator = $class->make_iterator( $source );
returns a new TAP::Parser::Iterator::Process for the source. π§
and "$source->raw" must be in one of these forms, no exceptions bestie:
{ exec => [ @exec ] }
[ @exec ]
$file
she croaks on error. dramatic? yes. deserved? also yes. π₯
iterator_class
the class of iterator to use β override it if you're sub-classing. defaults to TAP::Parser::Iterator::Process. she comes pre-dressed but you can absolutely restyle her. π
π SUBCLASSING π
please see "SUBCLASSING" in TAP::Parser for a subclassing overview. (yes, go read the other page, she's not repeating herself. main character energy.) π
πΈ Example πΈ
package MyRubySourceHandler;
use strict;
use Carp qw( croak );
use TAP::Parser::SourceHandler::Executable;
use base 'TAP::Parser::SourceHandler::Executable';
# expect $handler->(['mytest.rb', 'cmdline', 'args']);
sub make_iterator {
my ($self, $source) = @_;
my @test_args = @{ $source->test_args };
my $rb_file = $test_args[0];
croak("error: Ruby file '$rb_file' not found!") unless (-f $rb_file);
return $self->SUPER::raw_source(['/usr/bin/ruby', @test_args]);
}
look at her go. ruby file missing? croak. file there? run it. it's giving competence. ππ
π SEE ALSO π
TAP::ObjectTAP::ParserTAP::Parser::IteratorFactoryTAP::Parser::SourceHandlerTAP::Parser::SourceHandler::PerlTAP::Parser::SourceHandler::FileTAP::Parser::SourceHandler::HandleTAP::Parser::SourceHandler::RawTAP
go read them. iykyk. π¦
and that's the whole page, bestie! this was perl v5.44.0, documented on 2026-10-17, and the manual page name is TAP::Parser::SourceHandler::Executable(3perl) β no notes, she ate, periodt. π
β¨
π¦ 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