|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Mail::DMARC::Report::Aggregate::Record;  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our $VERSION = '1.20211209';  | 
| 
3
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
2221
 | 
 use strict;  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
40
 | 
    | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
425
 | 
    | 
| 
4
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
71
 | 
 use warnings;  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
36
 | 
    | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
395
 | 
    | 
| 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
6
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
84
 | 
 use Carp;  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
26
 | 
    | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
804
 | 
    | 
| 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
8
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
1038
 | 
 use parent 'Mail::DMARC::Base';  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
670
 | 
    | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
82
 | 
    | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 require Mail::DMARC::Report::Aggregate::Record::Identifiers;  | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 require Mail::DMARC::Report::Aggregate::Record::Auth_Results;  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 require Mail::DMARC::Report::Aggregate::Record::Row;  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new {  | 
| 
14
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
  
0
  
 | 
3241
 | 
     my ( $class, @args ) = @_;  | 
| 
15
 | 
16
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
72
 | 
     croak "invalid arguments" if @args % 2;  | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
17
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
54
 | 
     my $self = bless {}, $class;  | 
| 
18
 | 
16
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
88
 | 
     return $self if 0 == scalar @args;  | 
| 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
20
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
124
 | 
     my %args = @args;  | 
| 
21
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
52
 | 
     foreach my $key ( keys %args ) {  | 
| 
22
 | 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
118
 | 
         $self->$key( $args{$key} );  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
25
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
40
 | 
     return $self;  | 
| 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
28
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub identifiers {  | 
| 
29
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
  
0
  
 | 
671
 | 
     my ($self, @args) = @_;  | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
31
 | 
53
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
172
 | 
     if ( !scalar @args ) {  | 
| 
32
 | 
37
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
260
 | 
         return $self->{identifiers} if $self->{identifiers};  | 
| 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
34
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
35
 | 
17
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
88
 | 
     if ('HASH' eq ref $args[0]) {  | 
| 
36
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
20
 | 
         @args = %{ $args[0] };  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
52
 | 
    | 
| 
37
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
39
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $self->{identifiers} =  | 
| 
40
 | 
17
 | 
 
 | 
 
 | 
 
 | 
 
 | 
167
 | 
         Mail::DMARC::Report::Aggregate::Record::Identifiers->new(@args);  | 
| 
41
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
42
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
43
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub auth_results {  | 
| 
44
 | 
31
 | 
 
 | 
 
 | 
  
31
  
 | 
  
0
  
 | 
406
 | 
     my ($self, @args) = @_;  | 
| 
45
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
46
 | 
31
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
152
 | 
     if ( !scalar @args ) {  | 
| 
47
 | 
22
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
214
 | 
         return $self->{auth_results} if $self->{auth_results};  | 
| 
48
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
49
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
50
 | 
15
 | 
  
100
  
 | 
  
 66
  
 | 
 
 | 
 
 | 
94
 | 
     if ( 1 == scalar @args && 'HASH' eq ref $args[0] ) {  | 
| 
51
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
24
 | 
         @args = %{ $args[0] };  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
179
 | 
    | 
| 
52
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $self->{auth_results} =  | 
| 
55
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
141
 | 
         Mail::DMARC::Report::Aggregate::Record::Auth_Results->new(@args);  | 
| 
56
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
57
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
58
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub row {  | 
| 
59
 | 
54
 | 
 
 | 
 
 | 
  
54
  
 | 
  
0
  
 | 
1854
 | 
     my ($self, @args) = @_;  | 
| 
60
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
61
 | 
54
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
161
 | 
     if ( 0 == scalar @args ) {  | 
| 
62
 | 
44
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
320
 | 
         return $self->{row} if $self->{row};  | 
| 
63
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
64
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
65
 | 
16
 | 
  
100
  
 | 
  
 66
  
 | 
 
 | 
 
 | 
127
 | 
     if ( 1 == scalar @args && 'HASH' eq ref $args[0] ) {  | 
| 
66
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
19
 | 
         @args = %{ $args[0] };  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
39
 | 
    | 
| 
67
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
68
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
69
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $self->{row} =  | 
| 
70
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
179
 | 
         Mail::DMARC::Report::Aggregate::Record::Row->new(@args);  | 
| 
71
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
72
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
73
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  | 
| 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
75
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __END__  |