Test2:...ontrol(3perl)

πŸ’… NAME πŸ’…

Test2::EventFacet::Control β€” bestie, this is the facet for hub actions and behaviors ✨

It lives in the Perl Programmers Reference Guide, and it's part of the Test2 family, so you already know it's iconic πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, this facet is what you reach for when an event needs to give instructions to the Test2 internals. That's it. That's the whole vibe. It's the little note your event slips to the engine like "hey girl, do this" πŸŽ€

🌸 FIELDS 🌸

Every field here shows up two ways: as a hash key off $control, and as a method call. Same data, two doors, both slay πŸ’–

  • $string = $control->{details}
  • $string = $control->details()

A human readable explanation for the special behavior. Literally just words for humans, no cap 🫢

  • $bool = $control->{global}
  • $bool = $control->global()

True if the event is global in nature and should be seen by all hubs. Main character energy β€” everybody's watching πŸ‘‘

  • $exit = $control->{terminate}
  • $exit = $control->terminate()

Defined if the test should immediately exit. The value is the exit code, and heads up bestie, it may be 0. So don't go testing it for truthiness like a rookie, check if it's defined 😭

  • $bool = $control->{halt}
  • $bool = $control->halt()

True if all testing should be halted immediately. Not "pause", not "later", immediately. Periodt πŸ’€

  • $bool = $control->{has_callback}
  • $bool = $control->has_callback()

True if the callback($hub) method on the event should be called. So if this is true, go call it, bestie, it's waiting on you ✨

  • $encoding = $control->{encoding}
  • $encoding = $control->encoding()

This can be used to change the encoding from this event onward. New encoding era starts right here, no going back πŸ¦‹

  • $phase = $control->{phase}
  • $phase = $control->phase()

Used to signal that a phase change has occurred. Currently only the perl END phase is signaled. That's the whole roster rn πŸŽ€

🌈 SOURCE 🌈

The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>. Go peek, it's giving open source excellence πŸ’–

🧚 MAINTAINERS 🧚

Chad Granum <exodist@cpan.org>

⭐ AUTHORS ⭐

Chad Granum <exodist@cpan.org>

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/>


okay bestie that's the whole page, you ate it, go write some events πŸ’…βœ¨

little sign-off note: this was perl v5.44.0, dated 2026-10-17 β€” and the manual name it lives under is Test2:...ontrol(3perl), so if you're searching for it, that's the one πŸŽ€
πŸ“¦ 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