TEST2::EVENT::BAIL(3pm)
π
Test2::Event::Bail β the Test2::Event::Bail page, bestie edition
okay so this is Test2::Event::Bail, straight out of the Perl Programmers Reference Guide, and honestly? it's giving "emergency brake" energy and we're obsessed πβ¨
π NAME π
Test2::Event::Bail β Bailout! like literally, that's the whole name, no cap π
π¦ DESCRIPTION π¦
so here's the tea: the bailout event gets generated when things go horribly wrong and you need to halt all testing in the current file π like, not "oops one test failed" β this is the "we're shutting the whole thing down, bestie" event π₯
it's the main character of disaster events, fr fr π
β¨ SYNOPSIS β¨
use Test2::API qw/context/;
use Test2::Event::Bail;
my $ctx = context();
my $event = $ctx->bail('Stuff is broken');
see how easy that is? grab a context, call bail with your reason, and let the event do its thing π
πΈ METHODS πΈ
this one inherits from Test2::Event (yes, it's a whole nepo-baby situation and we love that for it π). on top of all that, it also defines:
$reason = $e->reasonβ this hands you back the reason for the bailout, so you can be like "okay but why did everything fall apart" and it'll actually tell you π«Ά
β SOURCE β
the source code repository for Test2 lives right here, go be nosy, it's iconic:
<https://github.com/Test-More/test-more/>
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
π 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/>
aaaand that's the whole page, bestie π§π thanks for reading, you ate that. this cutie was brought to you by perl v5.42.3, dated 2026-11-03, and it's still out here being Test2::Event::Bail(3pm) β periodt π
β¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl 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