line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::DieOnFail; |
2
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
3
|
1
|
|
|
1
|
|
2
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use Test::Stream::Plugin qw/import/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
4
|
use Test::Stream::Context(); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
80
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $LOADED = 0; |
9
|
|
|
|
|
|
|
sub load_ts_plugin { |
10
|
1
|
|
|
1
|
0
|
2
|
my $class = shift; |
11
|
1
|
|
|
|
|
1
|
my $caller = shift; |
12
|
1
|
50
|
|
|
|
2
|
return if $LOADED++; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Test::Stream::Context->ON_RELEASE(sub { |
15
|
11
|
|
|
11
|
|
11
|
my $ctx = shift; |
16
|
11
|
100
|
|
|
|
26
|
return if $ctx->hub->state->is_passing; |
17
|
2
|
|
|
|
|
6
|
$ctx->throw("(Die On Fail)"); |
18
|
1
|
|
|
|
|
8
|
}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |