line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
13
|
use v5.14.0; |
|
1
|
|
|
|
|
5
|
|
2
|
|
|
|
|
|
|
package JMAP::Tester::Abort 0.103; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
5
|
|
|
|
|
|
|
extends 'Throwable::Error'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
886
|
use namespace::clean; |
|
1
|
|
|
|
|
12030
|
|
|
1
|
|
|
|
|
6
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Sub::Exporter -setup => { |
10
|
|
|
|
|
|
|
exports => { |
11
|
|
|
|
|
|
|
abort => sub { |
12
|
3
|
|
|
|
|
609
|
my $pkg = shift; |
13
|
3
|
|
|
|
|
75
|
return sub { die $pkg->new(@_) } |
14
|
3
|
|
|
|
|
22
|
} |
15
|
|
|
|
|
|
|
} |
16
|
1
|
|
|
1
|
|
1035
|
}; |
|
1
|
|
|
|
|
11455
|
|
|
1
|
|
|
|
|
11
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
around BUILDARGS => sub { |
19
|
|
|
|
|
|
|
my ($orig, $self, @args) = @_; |
20
|
|
|
|
|
|
|
return { message => $args[0] } if @args == 1 && ! ref $args[0]; |
21
|
|
|
|
|
|
|
return $self->$orig(@args); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has message => ( |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has diagnostics => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub as_test_abort_events { |
34
|
|
|
|
|
|
|
return [ |
35
|
|
|
|
|
|
|
[ Ok => (pass => 0, name => $_[0]->message) ], |
36
|
|
|
|
|
|
|
($_[0]->diagnostics |
37
|
2
|
50
|
|
2
|
0
|
4210
|
? (map {; [ Diag => (message => $_) ] } @{ $_[0]->diagnostics }) |
|
3
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
9
|
|
38
|
|
|
|
|
|
|
: ()), |
39
|
|
|
|
|
|
|
]; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |