1Test2::Event::Bail(3) User Contributed Perl DocumentationTest2::Event::Bail(3)
2
3
4
6 Test2::Event::Bail - Bailout!
7
9 The bailout event is generated when things go horribly wrong and you
10 need to halt all testing in the current file.
11
13 use Test2::API qw/context/;
14 use Test2::Event::Bail;
15
16 my $ctx = context();
17 my $event = $ctx->bail('Stuff is broken');
18
20 Inherits from Test2::Event. Also defines:
21
22 $reason = $e->reason
23 The reason for the bailout.
24
26 The source code repository for Test2 can be found at
27 http://github.com/Test-More/test-more/.
28
30 Chad Granum <exodist@cpan.org>
31
33 Chad Granum <exodist@cpan.org>
34
36 Copyright 2020 Chad Granum <exodist@cpan.org>.
37
38 This program is free software; you can redistribute it and/or modify it
39 under the same terms as Perl itself.
40
41 See http://dev.perl.org/licenses/
42
43
44
45perl v5.32.1 2021-01-27 Test2::Event::Bail(3)