TAP::PARSER::RESULT::PLAN(3pm)
π TAP::Parser::Result::Plan (3pm)
okay so bestie, welcome to the Perl Programmers Reference Guide page for TAP::Parser::Result::Plan β yes that whole long name, it's giving "my full government name" energy π
β¨ NAME β¨
TAP::Parser::Result::Plan β the plan result token. that's it, that's the whole name. short king behavior π
πΈ VERSION πΈ
Version 3.50 β¨ (yes we're on 3.50, keep up)
π¦ DESCRIPTION π¦
okay so real talk: this is a subclass of TAP::Parser::Result. a token of this class gets returned whenever a plan line shows up. like, when the parser sees one of these:
1..1
ok 1 - woo hooo!
that 1..1 right there? that's the plan. gotta have a plan. periodt π
lowkey iconic, no cap.
π OVERRIDDEN METHODS π
ngl these are mainly listed here to shut up the pitiful screams of the pod coverage tests. they keep me awake at night π fr fr. so here they are:
as_stringβ overridden, listed for the pod coverage tests' sake πrawβ same vibe, also overridden, also here to quiet the screaming π
π§ Instance Methods π§
β plan
if ( $result->is_plan ) {
print $result->plan;
}
this is literally just a synonym for as_string. that's the whole thing. same energy, different name π«Ά
β tests_planned
my $planned = $result->tests_planned;
returns the number of tests planned. example so you get it: a plan of 1..17 will make this method return '17'. math is mathing β¨
β directive
my $directive = $plan->directive;
if a SKIP directive is bundled up with the plan, this method returns it. like this:
1..0 # SKIP: why bother?
bestie said "why bother" and honestly? valid π
β has_skip
if ( $result->has_skip ) { ... }
returns a boolean value telling you whether or not this test has a SKIP directive. true or false, yes or no, slay or slay π¦
β explanation
my $explanation = $plan->explanation;
if a SKIP directive was included with the plan, this method returns the explanation, if any. (note the "if any" β sometimes there just isn't one and that's okay π)
β todo_list
my $todo = $result->todo_list;
for ( @$todo ) {
...
}
you get a todo_list back, you loop over it, you do the things. main character energy for your test suite π
π quick vibe check: every flag, every method, every snippet above? all of it's here, untouched, exactly as written. we don't skip details in this group chat. periodt.
π see also
the page cross-references its parent class TAP::Parser::Result right up in the DESCRIPTION β that's your bestie, go say hi π«Ά
signed off with love, from the Perl Programmers Reference Guide era β this page is from perl v5.42.3, dated 2026-11-03, and the footer on the original says TAP::Parser::Result::Plan(3pm) one more time for the people in the back ππ
β¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms