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. πŸ‘‘

  1. figure out if the TAP::Parser::Source she got handed is an executable command β€” that's can_handle.
  2. 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' key
  • 0.8 β€” if it's a .bat file
  • 0.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::Object
  • TAP::Parser
  • TAP::Parser::IteratorFactory
  • TAP::Parser::SourceHandler
  • TAP::Parser::SourceHandler::Perl
  • TAP::Parser::SourceHandler::File
  • TAP::Parser::SourceHandler::Handle
  • TAP::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