line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Bail; |
2
|
57
|
|
|
57
|
|
535
|
use strict; |
|
57
|
|
|
|
|
59
|
|
|
57
|
|
|
|
|
1276
|
|
3
|
57
|
|
|
57
|
|
173
|
use warnings; |
|
57
|
|
|
|
|
55
|
|
|
57
|
|
|
|
|
1784
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000044'; |
6
|
|
|
|
|
|
|
|
7
|
57
|
|
|
57
|
|
183
|
use base 'Test2::Event'; |
|
57
|
|
|
|
|
63
|
|
|
57
|
|
|
|
|
3270
|
|
8
|
57
|
|
|
57
|
|
225
|
use Test2::Util::HashBase qw{reason}; |
|
57
|
|
|
|
|
61
|
|
|
57
|
|
|
|
|
275
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub callback { |
11
|
2
|
|
|
2
|
1
|
3
|
my $self = shift; |
12
|
2
|
|
|
|
|
3
|
my ($hub) = @_; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
10
|
$hub->set_bailed_out($self); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Make sure the tests terminate |
18
|
2
|
|
|
2
|
1
|
6
|
sub terminate { 255 }; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
1
|
4
|
sub global { 1 }; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
1
|
10
|
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
|
|
|
|
7
|
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__ |