line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20211209'; |
3
|
12
|
|
|
12
|
|
92
|
use strict; |
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
437
|
|
4
|
12
|
|
|
12
|
|
109
|
use warnings; |
|
12
|
|
|
|
|
41
|
|
|
12
|
|
|
|
|
335
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
66
|
use Carp; |
|
12
|
|
|
|
|
58
|
|
|
12
|
|
|
|
|
5738
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
16
|
|
|
16
|
0
|
76
|
my ( $class, @args ) = @_; |
10
|
16
|
50
|
|
|
|
73
|
croak "invalid arguments" if @args % 2; |
11
|
16
|
|
|
|
|
68
|
my %args = @args; |
12
|
16
|
|
|
|
|
91
|
my $self = bless { reason => [] }, $class; |
13
|
16
|
|
|
|
|
105
|
foreach my $key ( keys %args ) { |
14
|
56
|
|
|
|
|
228
|
$self->$key( $args{$key} ); |
15
|
|
|
|
|
|
|
} |
16
|
16
|
|
|
|
|
104
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub disposition { |
20
|
22
|
100
|
|
22
|
0
|
134
|
return $_[0]->{disposition} if 1 == scalar @_; |
21
|
|
|
|
|
|
|
croak "invalid disposition ($_[1]" |
22
|
16
|
50
|
|
|
|
50
|
if 0 == grep {/^$_[1]$/ix} qw/ reject quarantine none /; |
|
48
|
|
|
|
|
415
|
|
23
|
16
|
|
|
|
|
93
|
return $_[0]->{disposition} = $_[1]; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dkim { |
27
|
24
|
100
|
|
24
|
0
|
147
|
return $_[0]->{dkim} if 1 == scalar @_; |
28
|
18
|
|
|
|
|
119
|
return $_[0]->{dkim} = $_[1]; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub spf { |
32
|
24
|
100
|
|
24
|
0
|
130
|
return $_[0]->{spf} if 1 == scalar @_; |
33
|
18
|
|
|
|
|
62
|
return $_[0]->{spf} = $_[1]; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub reason { |
37
|
13
|
100
|
|
13
|
0
|
61
|
return $_[0]->{reason} if 1 == scalar @_; |
38
|
8
|
50
|
|
|
|
47
|
if ('ARRAY' eq ref $_[1]) { # one shot argument |
39
|
8
|
|
|
|
|
25
|
$_[0]->{reason} = $_[1]; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
else { |
42
|
0
|
|
|
|
|
0
|
push @{ $_[0]->{reason} }, $_[1]; |
|
0
|
|
|
|
|
0
|
|
43
|
|
|
|
|
|
|
} |
44
|
8
|
|
|
|
|
21
|
return $_[0]->{reason}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |