line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Bail; |
2
|
57
|
|
|
57
|
|
476
|
use strict; |
|
57
|
|
|
|
|
56
|
|
|
57
|
|
|
|
|
1275
|
|
3
|
57
|
|
|
57
|
|
161
|
use warnings; |
|
57
|
|
|
|
|
57
|
|
|
57
|
|
|
|
|
2209
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000043'; |
6
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) |
7
|
|
|
|
|
|
|
|
8
|
57
|
|
|
57
|
|
197
|
use base 'Test2::Event'; |
|
57
|
|
|
|
|
72
|
|
|
57
|
|
|
|
|
3388
|
|
9
|
57
|
|
|
57
|
|
249
|
use Test2::Util::HashBase qw{reason}; |
|
57
|
|
|
|
|
60
|
|
|
57
|
|
|
|
|
254
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub callback { |
12
|
2
|
|
|
2
|
1
|
2
|
my $self = shift; |
13
|
2
|
|
|
|
|
4
|
my ($hub) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
8
|
$hub->set_bailed_out($self); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Make sure the tests terminate |
19
|
2
|
|
|
2
|
1
|
5
|
sub terminate { 255 }; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
1
|
6
|
sub global { 1 }; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
2
|
1
|
7
|
sub causes_fail { 1 } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub summary { |
26
|
2
|
|
|
2
|
1
|
2
|
my $self = shift; |
27
|
|
|
|
|
|
|
return "Bail out! " . $self->{+REASON} |
28
|
2
|
100
|
|
|
|
8
|
if $self->{+REASON}; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
2
|
return "Bail out!"; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
1
|
2
|
sub diagnostics { 1 } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |