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