line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Aggregate::Record::Row; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20210927'; |
3
|
12
|
|
|
12
|
|
83
|
use strict; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
358
|
|
4
|
12
|
|
|
12
|
|
63
|
use warnings; |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
339
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
62
|
use Carp; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
4417
|
|
7
|
|
|
|
|
|
|
require Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
16
|
|
|
16
|
0
|
78
|
my ( $class, @args ) = @_; |
11
|
16
|
50
|
|
|
|
77
|
croak "invalid arguments" if @args % 2; |
12
|
16
|
|
|
|
|
52
|
my %args = @args; |
13
|
16
|
|
|
|
|
46
|
my $self = bless {}, $class; |
14
|
16
|
|
|
|
|
62
|
foreach my $key ( keys %args ) { |
15
|
28
|
|
|
|
|
102
|
$self->$key( $args{$key} ); |
16
|
|
|
|
|
|
|
} |
17
|
16
|
|
|
|
|
103
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub source_ip { |
21
|
22
|
100
|
|
22
|
0
|
711
|
return $_[0]->{source_ip} if 1 == scalar @_; |
22
|
16
|
|
|
|
|
65
|
return $_[0]->{source_ip} = $_[1]; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub policy_evaluated { |
26
|
43
|
|
|
43
|
0
|
723
|
my ($self, @args) = @_; |
27
|
|
|
|
|
|
|
|
28
|
43
|
100
|
|
|
|
138
|
if (0 == scalar @args) { |
29
|
27
|
50
|
|
|
|
191
|
return $self->{policy_evaluated} if $self->{policy_evaluated}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
16
|
100
|
|
|
|
63
|
if (1 == scalar @args) { |
33
|
11
|
50
|
|
|
|
41
|
if ('HASH' eq ref $args[0]) { |
34
|
11
|
|
|
|
|
20
|
@args = %{ $args[0] }; |
|
11
|
|
|
|
|
47
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return $self->{policy_evaluated} = |
39
|
16
|
|
|
|
|
151
|
Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated->new(@args); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub count { |
43
|
9
|
50
|
|
9
|
0
|
616
|
return $_[0]->{count} if 1 == scalar @_; |
44
|
9
|
|
|
|
|
38
|
return $_[0]->{count} = $_[1]; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |