« lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm
↑ Summary
lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm »
| 1 | package Mail::DMARC::Report::Aggregate::Record; | ||||||||||||||||||||||||||||
| 2 | 16 | our $VERSION = '2.20261110'; | |||||||||||||||||||||||||||
| 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 | 55 | ▶ | sub new( $class, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | 55 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 55 | my $self = bless {}, $class; | |||||||||||||||||||||||||||
| 18 | 55 | ▶ | return $self if !@args; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 18 | my %args = @args; | |||||||||||||||||||||||||||
| 21 | 18 | foreach my $key ( keys %args ) { | |||||||||||||||||||||||||||
| 22 | 54 | $self->$key( $args{$key} ); | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 18 | return $self; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 272 | ▶ | sub identifiers( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
identifiers: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 272 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 217 | ▶ | return $self->{identifiers} if $self->{identifiers}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 56 | ▶ | if ( 'HASH' eq ref $args[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 18 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | return $self->{identifiers} | ||||||||||||||||||||||||||||
| 39 | 56 | = Mail::DMARC::Report::Aggregate::Record::Identifiers->new(@args); | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 68 | ▶ | sub auth_results( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
auth_results: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 68 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 45 | 50 | ▶ | return $self->{auth_results} if $self->{auth_results}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 31 | ▶ | 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 | 18 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | return $self->{auth_results} | ||||||||||||||||||||||||||||
| 53 | 31 | = Mail::DMARC::Report::Aggregate::Record::Auth_Results->new(@args); | |||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 227 | ▶ | sub row( $self, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
row: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 227 | ▶ | if ( !@args ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 59 | 185 | ▶ | return $self->{row} if $self->{row}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 55 | ▶ | 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 | 18 | @args = %{ $args[0] }; | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | 55 | return $self->{row} = Mail::DMARC::Report::Aggregate::Record::Row->new(@args); | |||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | 16 | 1; | |||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | __END__ | ||||||||||||||||||||||||||||