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

filter: Statementstmt 0.0% 0 / 37 Branchbran 0.0% 0 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 65 CC 8 SCAR 24.6
CC
8
Cov
0%
policy_evaluated
30.0
new
6.0
source_ip
6.0
CRAP 11.6
1 package Mail::DMARC::Report::Aggregate::Record::Row;
2 our $VERSION = '2.20260827';
3 use strict;
4 use warnings;
5 use feature 'signatures';
6 no warnings 'experimental::args_array_with_signatures'; ## no critic (ProhibitNoWarnings)
7  
8 use Carp;
9 require Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated;
10  
11 sub new( $class, @args ) {
12 croak "invalid arguments" if @args % 2;
13 my %args = @args;
14 my $self = bless {}, $class;
15 foreach my $key ( keys %args ) {
16 $self->$key( $args{$key} );
17 }
18 return $self;
19 }
20  
21 sub source_ip( $self, $value = undef ) {
22 return $self->{source_ip} if @_ == 1;
23 return $self->{source_ip} = $value;
24 }
25  
26 sub policy_evaluated( $self, @args ) {
27  
28 if ( !@args ) {
29 return $self->{policy_evaluated} if $self->{policy_evaluated};
30 }
31  
32 if ( @args == 1 ) {
33 if ( 'HASH' eq ref $args[0] ) {
34 @args = %{ $args[0] };
35 }
36 }
37  
38 return $self->{policy_evaluated}
39 = Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated->new(@args);
40 }
41  
42 sub count( $self, $value = undef ) {
43 return $self->{count} if @_ == 1;
44 return $self->{count} = $value;
45 }
46  
47 1;
48  
49 __END__
50  
51 =pod
52  
53 =head1 NAME
54  
55 Mail::DMARC::Report::Aggregate::Record::Row - row section of a DMARC aggregate record
56  
57 =head1 VERSION
58  
59 version 2.20260827
60  
61 =head1 AUTHORS
62  
63 =over 4
64  
65 =item *
66  
67 Matt Simerson <msimerson@cpan.org>
68  
69 =item *
70  
71 Davide Migliavacca <shari@cpan.org>
72  
73 =item *
74  
75 Marc Bradshaw <marc@marcbradshaw.net>
76  
77 =back
78  
79 =head1 COPYRIGHT AND LICENSE
80  
81 This software is copyright (c) 2026 by Matt Simerson.
82  
83 This is free software; you can redistribute it and/or modify it under
84 the same terms as the Perl 5 programming language system itself.
85  
86 =cut