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_string
  • raw

πŸŽ€ 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