blib/lib/Mail/DMARC/Report/Aggregate/Record.pm untested

filter: Statementstmt 0.0% 0 / 51 Branchbran 0.0% 0 / 22 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 95 CC 12 SCAR 25.4
CC
12
Cov
0%
identifiers
20.0
auth_results
20.0
row
20.0
CRAP 12.7
1 package Mail::DMARC::Report::Aggregate::Record;
2 our $VERSION = '2.20260827';
3 use strict;
4 use warnings;
5 use feature 'signatures';
6  
7 use Carp;
8  
9 use parent 'Mail::DMARC::Base';
10 require Mail::DMARC::Report::Aggregate::Record::Identifiers;
11 require Mail::DMARC::Report::Aggregate::Record::Auth_Results;
12 require Mail::DMARC::Report::Aggregate::Record::Row;
13  
14 sub new( $class, @args ) {
15 croak "invalid arguments" if @args % 2;
16  
17 my $self = bless {}, $class;
18 return $self if !@args;
19  
20 my %args = @args;
21 foreach my $key ( keys %args ) {
22 $self->$key( $args{$key} );
23 }
24  
25 return $self;
26 }
27  
28 sub identifiers( $self, @args ) {
29  
30 if ( !@args ) {
31 return $self->{identifiers} if $self->{identifiers};
32 }
33  
34 if ( 'HASH' eq ref $args[0] ) {
35 @args = %{ $args[0] };
36 }
37  
38 return $self->{identifiers}
39 = Mail::DMARC::Report::Aggregate::Record::Identifiers->new(@args);
40 }
41  
42 sub auth_results( $self, @args ) {
43  
44 if ( !@args ) {
45 return $self->{auth_results} if $self->{auth_results};
46 }
47  
48 if ( @args == 1 && 'HASH' eq ref $args[0] ) {
49 @args = %{ $args[0] };
50 }
51  
52 return $self->{auth_results}
53 = Mail::DMARC::Report::Aggregate::Record::Auth_Results->new(@args);
54 }
55  
56 sub row( $self, @args ) {
57  
58 if ( !@args ) {
59 return $self->{row} if $self->{row};
60 }
61  
62 if ( @args == 1 && 'HASH' eq ref $args[0] ) {
63 @args = %{ $args[0] };
64 }
65  
66 return $self->{row} = Mail::DMARC::Report::Aggregate::Record::Row->new(@args);
67 }
68  
69 1;
70  
71 __END__
72  
73 =pod
74  
75 =head1 NAME
76  
77 Mail::DMARC::Report::Aggregate::Record - record section of aggregate report
78  
79 =head1 VERSION
80  
81 version 2.20260827
82  
83 =head1 DESCRIPTION
84  
85 An aggregate report record, with object methods for identifiers, auth_results, and each row.
86  
87 =head1 AUTHORS
88  
89 =over 4
90  
91 =item *
92  
93 Matt Simerson <msimerson@cpan.org>
94  
95 =item *
96  
97 Davide Migliavacca <shari@cpan.org>
98  
99 =item *
100  
101 Marc Bradshaw <marc@marcbradshaw.net>
102  
103 =back
104  
105 =head1 COPYRIGHT AND LICENSE
106  
107 This software is copyright (c) 2026 by Matt Simerson.
108  
109 This is free software; you can redistribute it and/or modify it under
110 the same terms as the Perl 5 programming language system itself.
111  
112 =cut