line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Store; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20210927'; |
3
|
12
|
|
|
12
|
|
96
|
use strict; |
|
12
|
|
|
|
|
57
|
|
|
12
|
|
|
|
|
348
|
|
4
|
10
|
|
|
10
|
|
79
|
use warnings; |
|
10
|
|
|
|
|
23
|
|
|
10
|
|
|
|
|
244
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
56
|
use Carp; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
626
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
85
|
use parent 'Mail::DMARC::Base'; |
|
10
|
|
|
|
|
24
|
|
|
10
|
|
|
|
|
77
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub delete_report { |
11
|
4
|
|
|
4
|
0
|
19
|
my $self = shift; |
12
|
4
|
|
|
|
|
17
|
return $self->backend->delete_report(@_); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub error { |
16
|
2
|
|
|
2
|
0
|
25
|
my $self = shift; |
17
|
2
|
|
|
|
|
19
|
return $self->backend->insert_error(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub retrieve { |
21
|
1
|
|
|
0
|
0
|
3
|
my $self = shift; |
22
|
1
|
|
|
|
|
21
|
return $self->backend->retrieve(@_); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub next_todo { |
26
|
8
|
|
|
8
|
0
|
17
|
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
|
37
|
my $self = shift; |
37
|
19
|
|
|
|
|
90
|
my $backend = $self->config->{report_store}{backend}; |
38
|
|
|
|
|
|
|
|
39
|
19
|
50
|
|
|
|
10379
|
croak "no backend defined?!" if !$backend; |
40
|
|
|
|
|
|
|
|
41
|
19
|
100
|
|
|
|
107
|
return $self->{$backend} if ref $self->{$backend}; |
42
|
11
|
|
|
|
|
37
|
my $module = "Mail::DMARC::Report::Store::$backend"; |
43
|
11
|
|
|
3
|
|
1205
|
eval "use $module"; ## no critic (Eval) |
|
3
|
|
|
|
|
1988
|
|
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
91
|
|
44
|
11
|
50
|
|
|
|
64
|
if ($@) { |
45
|
0
|
|
|
|
|
0
|
croak "Unable to load backend $backend: $@\n"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
11
|
|
|
|
|
74
|
return $self->{$backend} = $module->new; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |