line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Plugin::DieOnFail; |
2
|
1
|
|
|
1
|
|
536
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use Test2::API qw/test2_add_callback_context_release/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
140
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $LOADED = 0; |
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
50
|
|
1
|
|
12
|
return if $LOADED++; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
test2_add_callback_context_release(sub { |
14
|
11
|
|
|
11
|
|
37947
|
my $ctx = shift; |
15
|
11
|
100
|
|
|
|
31
|
return if $ctx->hub->is_passing; |
16
|
2
|
|
|
|
|
34
|
$ctx->throw("(Die On Fail)"); |
17
|
1
|
|
|
|
|
9
|
}); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |