Test2::Event::Bail(3) User Contributed Perl Documentation Test2::Event::Bail(3)

# [NAME](#NAME)

Test2::Event::Bail - Bailout!

# [DESCRIPTION](#DESCRIPTION)

The bailout event is generated when things go horribly wrong and you need to halt all testing in the current file.

# [SYNOPSIS](#SYNOPSIS)

```
    use Test2::API qw/context/;
    use Test2::Event::Bail;
    my $ctx = context();
    my $event = $ctx->bail('Stuff is broken');
```

# [METHODS](#METHODS)

Inherits from Test2::Event. Also defines:

$reason = $e-&gt;reason

The reason for the bailout.

# [SOURCE](#SOURCE)

The source code repository for Test2 can be found at &lt;https://github.com/Test-More/test-more/&gt;.

# [MAINTAINERS](#MAINTAINERS)

[Chad Granum &lt;exodist@cpan.org&gt;](#Chad)

# [AUTHORS](#AUTHORS)

[Chad Granum &lt;exodist@cpan.org&gt;](#Chad~2)

# [COPYRIGHT](#COPYRIGHT)

Copyright Chad Granum &lt;exodist@cpan.org&gt;.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See &lt;https://dev.perl.org/licenses/&gt;

2026-10-24 perl v5.44.0

---

Document: Test2::Event::Bail(3pm) from perl-test-simple 1.302226-r1 (Chainguard OS)
Source: https://github.com/Test-More/test-more
