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