| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; |
|
2
|
|
|
|
|
|
|
our $VERSION = '1.20210927'; |
|
3
|
12
|
|
|
12
|
|
86
|
use strict; |
|
|
12
|
|
|
|
|
29
|
|
|
|
12
|
|
|
|
|
350
|
|
|
4
|
12
|
|
|
12
|
|
98
|
use warnings; |
|
|
12
|
|
|
|
|
41
|
|
|
|
12
|
|
|
|
|
314
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
60
|
use Carp; |
|
|
12
|
|
|
|
|
55
|
|
|
|
12
|
|
|
|
|
5247
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
|
9
|
16
|
|
|
16
|
0
|
68
|
my ( $class, @args ) = @_; |
|
10
|
16
|
50
|
|
|
|
75
|
croak "invalid arguments" if @args % 2; |
|
11
|
16
|
|
|
|
|
68
|
my %args = @args; |
|
12
|
16
|
|
|
|
|
71
|
my $self = bless { reason => [] }, $class; |
|
13
|
16
|
|
|
|
|
65
|
foreach my $key ( keys %args ) { |
|
14
|
56
|
|
|
|
|
205
|
$self->$key( $args{$key} ); |
|
15
|
|
|
|
|
|
|
} |
|
16
|
16
|
|
|
|
|
93
|
return $self; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub disposition { |
|
20
|
22
|
100
|
|
22
|
0
|
114
|
return $_[0]->{disposition} if 1 == scalar @_; |
|
21
|
|
|
|
|
|
|
croak "invalid disposition ($_[1]" |
|
22
|
16
|
50
|
|
|
|
47
|
if 0 == grep {/^$_[1]$/ix} qw/ reject quarantine none /; |
|
|
48
|
|
|
|
|
346
|
|
|
23
|
16
|
|
|
|
|
75
|
return $_[0]->{disposition} = $_[1]; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dkim { |
|
27
|
24
|
100
|
|
24
|
0
|
102
|
return $_[0]->{dkim} if 1 == scalar @_; |
|
28
|
18
|
|
|
|
|
65
|
return $_[0]->{dkim} = $_[1]; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub spf { |
|
32
|
24
|
100
|
|
24
|
0
|
117
|
return $_[0]->{spf} if 1 == scalar @_; |
|
33
|
18
|
|
|
|
|
64
|
return $_[0]->{spf} = $_[1]; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub reason { |
|
37
|
13
|
100
|
|
13
|
0
|
69
|
return $_[0]->{reason} if 1 == scalar @_; |
|
38
|
8
|
50
|
|
|
|
43
|
if ('ARRAY' eq ref $_[1]) { # one shot argument |
|
39
|
8
|
|
|
|
|
30
|
$_[0]->{reason} = $_[1]; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
else { |
|
42
|
0
|
|
|
|
|
0
|
push @{ $_[0]->{reason} }, $_[1]; |
|
|
0
|
|
|
|
|
0
|
|
|
43
|
|
|
|
|
|
|
} |
|
44
|
8
|
|
|
|
|
19
|
return $_[0]->{reason}; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |