line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Plugin::BailOnFail; |
2
|
1
|
|
|
1
|
|
513
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
47
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use Test2::API qw/test2_add_callback_context_release/; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
162
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $LOADED = 0; |
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
50
|
|
1
|
|
13
|
return if $LOADED++; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
test2_add_callback_context_release(sub { |
14
|
9
|
|
|
9
|
|
37662
|
my $ctx = shift; |
15
|
9
|
100
|
|
|
|
30
|
return if $ctx->hub->is_passing; |
16
|
2
|
|
|
|
|
35
|
$ctx->bail("(Bail On Fail)"); |
17
|
1
|
|
|
|
|
10
|
}); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |