line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Bail; |
2
|
54
|
|
|
54
|
|
461
|
use strict; |
|
54
|
|
|
|
|
56
|
|
|
54
|
|
|
|
|
1170
|
|
3
|
54
|
|
|
54
|
|
139
|
use warnings; |
|
54
|
|
|
|
|
50
|
|
|
54
|
|
|
|
|
2007
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000042'; |
6
|
|
|
|
|
|
|
|
7
|
54
|
|
|
54
|
|
164
|
use base 'Test2::Event'; |
|
54
|
|
|
|
|
47
|
|
|
54
|
|
|
|
|
2995
|
|
8
|
54
|
|
|
54
|
|
187
|
use Test2::Util::HashBase qw{reason}; |
|
54
|
|
|
|
|
72
|
|
|
54
|
|
|
|
|
232
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub callback { |
11
|
2
|
|
|
2
|
1
|
4
|
my $self = shift; |
12
|
2
|
|
|
|
|
7
|
my ($hub) = @_; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
10
|
$hub->set_bailed_out($self); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Make sure the tests terminate |
18
|
2
|
|
|
2
|
1
|
4
|
sub terminate { 255 }; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
1
|
5
|
sub global { 1 }; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
1
|
11
|
sub causes_fail { 1 } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub summary { |
25
|
2
|
|
|
2
|
1
|
2
|
my $self = shift; |
26
|
|
|
|
|
|
|
return "Bail out! " . $self->{+REASON} |
27
|
2
|
100
|
|
|
|
8
|
if $self->{+REASON}; |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
3
|
return "Bail out!"; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
1
|
3
|
sub diagnostics { 1 } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |