line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Store; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20230215'; |
3
|
12
|
|
|
12
|
|
104
|
use strict; |
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
352
|
|
4
|
10
|
|
|
10
|
|
94
|
use warnings; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
261
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
57
|
use Carp; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
563
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
70
|
use parent 'Mail::DMARC::Base'; |
|
10
|
|
|
|
|
27
|
|
|
10
|
|
|
|
|
84
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub delete_report { |
11
|
4
|
|
|
4
|
0
|
17
|
my $self = shift; |
12
|
4
|
|
|
|
|
47
|
return $self->backend->delete_report(@_); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub error { |
16
|
2
|
|
|
2
|
0
|
25
|
my $self = shift; |
17
|
2
|
|
|
|
|
14
|
return $self->backend->insert_error(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub retrieve { |
21
|
1
|
|
|
0
|
0
|
3
|
my $self = shift; |
22
|
1
|
|
|
|
|
22
|
return $self->backend->retrieve(@_); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub next_todo { |
26
|
8
|
|
|
8
|
0
|
20
|
my $self = shift; |
27
|
8
|
|
|
|
|
31
|
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
|
44
|
my $self = shift; |
37
|
19
|
|
|
|
|
96
|
my $backend = $self->config->{report_store}{backend}; |
38
|
|
|
|
|
|
|
|
39
|
19
|
50
|
|
|
|
11012
|
croak "no backend defined?!" if !$backend; |
40
|
|
|
|
|
|
|
|
41
|
19
|
100
|
|
|
|
142
|
return $self->{$backend} if ref $self->{$backend}; |
42
|
11
|
|
|
|
|
48
|
my $module = "Mail::DMARC::Report::Store::$backend"; |
43
|
11
|
|
|
3
|
|
1135
|
eval "use $module"; ## no critic (Eval) |
|
3
|
|
|
|
|
2108
|
|
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
85
|
|
44
|
11
|
50
|
|
|
|
65
|
if ($@) { |
45
|
0
|
|
|
|
|
0
|
croak "Unable to load backend $backend: $@\n"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
11
|
|
|
|
|
126
|
return $self->{$backend} = $module->new; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |