line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Store; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20211209'; |
3
|
12
|
|
|
12
|
|
107
|
use strict; |
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
386
|
|
4
|
10
|
|
|
10
|
|
88
|
use warnings; |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
262
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
58
|
use Carp; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
618
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
89
|
use parent 'Mail::DMARC::Base'; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
81
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub delete_report { |
11
|
4
|
|
|
4
|
0
|
21
|
my $self = shift; |
12
|
4
|
|
|
|
|
18
|
return $self->backend->delete_report(@_); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub error { |
16
|
2
|
|
|
2
|
0
|
28
|
my $self = shift; |
17
|
2
|
|
|
|
|
22
|
return $self->backend->insert_error(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub retrieve { |
21
|
1
|
|
|
0
|
0
|
12
|
my $self = shift; |
22
|
1
|
|
|
|
|
41
|
return $self->backend->retrieve(@_); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub next_todo { |
26
|
8
|
|
|
8
|
0
|
30
|
my $self = shift; |
27
|
8
|
|
|
|
|
32
|
return $self->backend->next_todo(@_); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub retrieve_todo { |
31
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
32
|
0
|
|
|
|
|
0
|
return $self->backend->retrieve_todo(@_); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub backend { |
36
|
19
|
|
|
19
|
0
|
65
|
my $self = shift; |
37
|
19
|
|
|
|
|
79
|
my $backend = $self->config->{report_store}{backend}; |
38
|
|
|
|
|
|
|
|
39
|
19
|
50
|
|
|
|
11572
|
croak "no backend defined?!" if !$backend; |
40
|
|
|
|
|
|
|
|
41
|
19
|
100
|
|
|
|
151
|
return $self->{$backend} if ref $self->{$backend}; |
42
|
11
|
|
|
|
|
39
|
my $module = "Mail::DMARC::Report::Store::$backend"; |
43
|
11
|
|
|
3
|
|
1484
|
eval "use $module"; ## no critic (Eval) |
|
3
|
|
|
|
|
3033
|
|
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
110
|
|
44
|
11
|
50
|
|
|
|
69
|
if ($@) { |
45
|
0
|
|
|
|
|
0
|
croak "Unable to load backend $backend: $@\n"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
11
|
|
|
|
|
76
|
return $self->{$backend} = $module->new; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |