TAP::PARSER::RESULT::PLAN(3perl)
π NAME π
TAP::Parser::Result::Plan β the plan result token, bestie. It's giving "we have a plan and the plan is the plan" β¨
πΈ VERSION πΈ
Version 3.52 β yep, that's the one, no cap π«Ά
π¦ DESCRIPTION π¦
Okay so real talk: this is a subclass of TAP::Parser::Result. Whenever the parser bumps into a plan line, it hands you back a token of this class. That's the whole vibe π
1..1
ok 1 - woo hooo!
See that 1..1 up top? That's the plan. And listen β gotta have a plan. Periodt. π
β¨ OVERRIDDEN METHODS β¨
These are mainly listed here to shut up the pitiful screams of the pod coverage tests. They keep me awake at night, fr fr π (iconic behaviour from a test suite, honestly).
as_stringraw
π Instance Methods π
plan
if ( $result->is_plan ) {
print $result->plan;
}
This is merely a synonym for as_string. Same energy, different name, lowkey slay π
tests_planned
my $planned = $result->tests_planned;
Returns the number of tests planned. Like, for example, a plan of 1..17 will cause this method to return '17'. Math girlies rise up π§
directive
my $directive = $plan->directive;
If a SKIP directive is included with the plan, this method will return it. Look:
1..0 # SKIP: why bother?
ngl that comment is so valid of it π
has_skip
if ( $result->has_skip ) { ... }
Returns a boolean value indicating whether or not this test has a SKIP directive. Yes or no, that's it, that's the whole thing π
explanation
my $explanation = $plan->explanation;
If a SKIP directive was included with the plan, this method will return the explanation, if any. Sometimes there's a reason, sometimes there's just vibes π
todo_list
my $todo = $result->todo_list;
for ( @$todo ) {
...
}
And that's the page, bestie!! Written up in perl v5.44.0 on 2026-10-17 β yes the source and the date, I remembered, I always remember π Go forth and plan your tests, main character energy only πβ¨
π¦ 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