Test2::Event::Plan(3)
πΈ NAME πΈ
Test2::Event::Plan β the event of a plan. This page is from the User Contributed Perl Documentation, and we're folding that manual-name moment in right here at the top instead of making you read a crusty header. You're welcome, bestie. π
β¨ DESCRIPTION β¨
Plan events fire off whenever a plan is declared, whenever done testing is called, or whenever a subtext completes. Those are the three little moments where this event shows up and says hi. Periodt. πβ¨
π SYNOPSIS π
Okay, here's the exact recipe β copy it character for character if you need it:
use Test2::API qw/context/;
use Test2::Event::Plan;
my $ctx = context();
# Plan for 10 tests to run
my $event = $ctx->plan(10);
# Plan to skip all tests (will exit 0)
$ctx->plan(0, skip_all => "These tests need to be skipped");
π ACCESSORS π
The accessors are giving main character energy β here's the whole lineup:
$num = $plan->maxβ gets the number of expected tests. Literally the test count, bestie. π’$dir = $plan->directiveβ gets the directive, such asTODO,skip_all, orno_plan. That's the instruction vibe, ngl. π$reason = $plan->reasonβ gets the reason for the directive. The why behind the what, iykyk. π
π¦ SOURCE π¦
Test2's source code repository is literally right here: <https://github.com/Test-More/test-more/>. Go peek, bestie. π«Ά
π MAINTAINERS π
Chad Granum <exodist@cpan.org> is holding it down as maintainer. Iconic. π
β AUTHORS β
Chad Granum <exodist@cpan.org> gets the author credit too β same legend, fr fr. β
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <https://dev.perl.org/licenses/>.
And that's the whole page, bestie β brought to you by perl v5.42.0, dated 2025-07-28, and it's Test2::Event::Plan(3). Bye, love you, mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-Simple 1.302214-bp160.1.2 Β· Artistic-1.0 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