« blib/lib/Mail/DMARC/Report.pm
↑ Summary
lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm »
| 1 | package Mail::DMARC::Report::Aggregate::Record; | ||||||||||||||||||||||||||||
| 2 | 16 | our $VERSION = '2.20260827'; | |||||||||||||||||||||||||||
| 3 | 16 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 16 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 16 | ▶ | use feature 'signatures'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 16 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 16 | ▶ | use parent 'Mail::DMARC::Base'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 16 | require Mail::DMARC::Report::Aggregate::Record::Identifiers; | |||||||||||||||||||||||||||
| 11 | 16 | require Mail::DMARC::Report::Aggregate::Record::Auth_Results; | |||||||||||||||||||||||||||
| 12 | 16 | require Mail::DMARC::Report::Aggregate::Record::Row; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 53 | ▶ | sub new( $class, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | 53 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 53 | my $self = bless {}, $class; | |||||||||||||||||||||||||||
| 18 | 53 | ▶ | return $self if !@args; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 17 | my %args = @args; | |||||||||||||||||||||||||||
| 21 | 17 | foreach my $key ( keys %args ) { | |||||||||||||||||||||||||||
| 22 | 51 | $self->$key( $args{$key} ); | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 17 | return $self; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 264 | ▶ | sub identifiers( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
identifiers: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 264 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 211 | ▶ | return $self->{identifiers} if $self->{identifiers}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 54 | ▶ | if ( 'HASH' eq ref $args[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 17 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | return $self->{identifiers} | ||||||||||||||||||||||||||||
| 39 | 54 | = Mail::DMARC::Report::Aggregate::Record::Identifiers->new(@args); | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 63 | ▶ | sub auth_results( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
auth_results: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 63 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 45 | 46 | ▶ | return $self->{auth_results} if $self->{auth_results}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 29 | ▶ | if ( @args == 1 && 'HASH' eq ref $args[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@args == 1 and "HASH" eq ref $args[0]
MC/DC50%1/2
@args == 1 and "HASH" eq ref $args[0]
@args == 1
"HASH" eq ref $args[0]
Truth table66%2/3
A and B
A= @args == 1B= "HASH" eq ref $args[0]
| |||||||||||||||||||||||||||||
| 49 | 17 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | return $self->{auth_results} | ||||||||||||||||||||||||||||
| 53 | 29 | = Mail::DMARC::Report::Aggregate::Record::Auth_Results->new(@args); | |||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 219 | ▶ | sub row( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
row: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 219 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 59 | 178 | ▶ | return $self->{row} if $self->{row}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 53 | ▶ | if ( @args == 1 && 'HASH' eq ref $args[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@args == 1 and "HASH" eq ref $args[0]
MC/DC50%1/2
@args == 1 and "HASH" eq ref $args[0]
@args == 1
"HASH" eq ref $args[0]
Truth table66%2/3
A and B
A= @args == 1B= "HASH" eq ref $args[0]
| |||||||||||||||||||||||||||||
| 63 | 17 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | 53 | return $self->{row} = Mail::DMARC::Report::Aggregate::Record::Row->new(@args); | |||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | 16 | 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 | ||||||||||||||||||||||||||||