Test::A...:Planner(3)
โจ NAME โจ
Test::Able::Planner โ bestie, this is the planning role ๐ (it's a Perl manual page, section 3, for anyone keeping score ๐)
๐ฆ DESCRIPTION ๐ฆ
Okay so listen. This role? It's literally the core of the planning support in Test::Able. The whole beating heart of it. Main character energy, no cap. ๐
And here's the tea: like, the vast majority of the time, all you actually need planning-wise is to set the plans at the method level. That's it. That's the whole vibe. But if you wanna know how planning in Test::Able really works under the hood, keep reading, because we're going in. ๐ซถ
So to make planning happen there's a whole hierarchy of plans. Behold, the pecking order:
- test-related methods
- test objects
- test runner object
Test::Builder
The way it stacks up: the sum of all the constituent method plans make up the object plan. Then the sum of all the constituent object plans make up the runner object plan. And then the runner object plan gets added to Test::Builder's plan. Layers on layers on layers, it's giving onion ๐ง
โจ
Now โ plot twist โ it's possible to set a method's plan at any time. Any time!! And to make that possible, the object and runner object plans are cleared when a method plan is set. Then the runner object's plan gets recalculated, at the latest, when it needs to add to Test::Builder's plan. So it's never stale, it just gets rebuilt right when it's needed. Iconic behavior honestly.
๐ญ Okay so rnTest::Builderdoes not support deferred planning. Not yet. And until such time as it does,Test::Ableemulates it as best it can for its own purposes. We work with what we have, bestie.
Here's how the two situations shake out:
- If
Test::Builder's plan is set to a numeric value, thenTest::Ablewill not touch it. Hands off. Respecting boundaries. ๐ - If
Test::Builder's plan isno_plan, thenTest::Ablewill persuadeTest::Builderto do deferred planning with what it thinks is the plan. Manifesting the plan, fr fr. โจ
๐ And note, as a lil convenience: ifTest::Builder's plan is not declared by the timeTest::Able'srun_tests()is called, the plan will be set tono_plan. Surprise! It'sno_plannow. ๐
๐ธ ATTRIBUTES ๐ธ
builderโ theTest::Builderinstance. Your builder boo. ๐ ๏ธplanโ test plan, similar toTest::Builder's. Same vibe, different object. ๐runner_planโ the plan that the test runner object manages. This is the top level plan that all other plans are aggregated into. The big boss plan. ๐last_runner_planโ used by the test runner object in calculatingTest::Builder's plan. It remembers the last one so math can happen. ๐งฎ
๐ AUTHOR ๐
Justin DeVuyst, justin@devuyst.com โ shoutout to the legend, we stan. ๐ซถ
โญ COPYRIGHT AND LICENSE โญ
Copyright 2009 by Justin DeVuyst.
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Slay, open source. ๐
and that's the whole page bestie!! ๐ โจ this lil writeup came from the perl v5.42.0 manual pages, dated 2025-07-25 โ go forth and plan ur tests, u got this ๐๐ฆ๐
๐ฆ where this page comes from
- fedora 43: perl-Test-Able 0.11-41.fc43 ยท GPL-1.0-or-later OR Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms