line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Report::Aggregate::Record::Row; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20211209'; |
3
|
12
|
|
|
12
|
|
87
|
use strict; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
397
|
|
4
|
12
|
|
|
12
|
|
62
|
use warnings; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
334
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
60
|
use Carp; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
4711
|
|
7
|
|
|
|
|
|
|
require Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
16
|
|
|
16
|
0
|
68
|
my ( $class, @args ) = @_; |
11
|
16
|
50
|
|
|
|
69
|
croak "invalid arguments" if @args % 2; |
12
|
16
|
|
|
|
|
57
|
my %args = @args; |
13
|
16
|
|
|
|
|
44
|
my $self = bless {}, $class; |
14
|
16
|
|
|
|
|
69
|
foreach my $key ( keys %args ) { |
15
|
28
|
|
|
|
|
109
|
$self->$key( $args{$key} ); |
16
|
|
|
|
|
|
|
} |
17
|
16
|
|
|
|
|
124
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub source_ip { |
21
|
22
|
100
|
|
22
|
0
|
757
|
return $_[0]->{source_ip} if 1 == scalar @_; |
22
|
16
|
|
|
|
|
116
|
return $_[0]->{source_ip} = $_[1]; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub policy_evaluated { |
26
|
43
|
|
|
43
|
0
|
710
|
my ($self, @args) = @_; |
27
|
|
|
|
|
|
|
|
28
|
43
|
100
|
|
|
|
191
|
if (0 == scalar @args) { |
29
|
27
|
50
|
|
|
|
313
|
return $self->{policy_evaluated} if $self->{policy_evaluated}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
16
|
100
|
|
|
|
89
|
if (1 == scalar @args) { |
33
|
11
|
50
|
|
|
|
46
|
if ('HASH' eq ref $args[0]) { |
34
|
11
|
|
|
|
|
25
|
@args = %{ $args[0] }; |
|
11
|
|
|
|
|
62
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return $self->{policy_evaluated} = |
39
|
16
|
|
|
|
|
194
|
Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated->new(@args); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub count { |
43
|
9
|
50
|
|
9
|
0
|
622
|
return $_[0]->{count} if 1 == scalar @_; |
44
|
9
|
|
|
|
|
28
|
return $_[0]->{count} = $_[1]; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |