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