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