« lib/Mail/DMARC/Report/Aggregate/Record.pm
↑ Summary
lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm »
| 1 | package Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; | ||||||||||||||||||||||||||||||||||||||
| 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 | 16 | ▶ | no warnings 'experimental::args_array_with_signatures'; ## no critic (ProhibitNoWarnings) | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||
| 8 | 16 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||
| 10 | 57 | ▶ | sub new( $class, @args ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 11 | 57 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 12 | 57 | my %args = @args; | |||||||||||||||||||||||||||||||||||||
| 13 | 57 | my $self = bless { reason => [] }, $class; | |||||||||||||||||||||||||||||||||||||
| 14 | 57 | foreach my $key ( keys %args ) { | |||||||||||||||||||||||||||||||||||||
| 15 | 181 | $self->$key( $args{$key} ); | |||||||||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||||||||
| 17 | 57 | return $self; | |||||||||||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||
| 20 | 93 | ▶ | sub disposition( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
disposition: called CC=6 SCAR=18.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 21 | 93 | ▶ | return $self->{disposition} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 22 | croak 'invalid disposition: ' . ( $value // '(undef)' ) | ||||||||||||||||||||||||||||||||||||||
| 23 | 57 | ▶ | if !defined $value || 0 == grep {/^$value$/ix} qw/ reject quarantine none /; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition60%3/5
not defined $value or 0 == grep({/^$value$/xi;} "reject", "quarantine", "none")
$value // "(undef)"
MC/DC50%1/2
not defined $value or 0 == grep({/^$value$/xi;} "reject", "quarantine", "none")
not defined $value
0 == grep({/^$value$/xi;} "reject", "quarantine", "none")
MC/DC0%0/1
$value // "(undef)"
$value
Truth table66%2/3
not(A) or B
A= not defined $valueB= 0 == grep({/^$value$/xi;} "reject", "quarantine", "none")
Truth table50%1/2
A
A= $value
| |||||||||||||||||||||||||||||||||||||||
| 24 | 56 | return $self->{disposition} = $value; | |||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||
| 27 | 97 | ▶ | sub dkim( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
dkim: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 28 | 97 | ▶ | return $self->{dkim} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 29 | 59 | return $self->{dkim} = $value; | |||||||||||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||
| 32 | 93 | ▶ | sub spf( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
spf: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 33 | 93 | ▶ | return $self->{spf} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 34 | 57 | return $self->{spf} = $value; | |||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||
| 37 | 28 | ▶ | sub reason( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
reason: called CC=4 SCAR=14.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 38 | 28 | ▶ | return $self->{reason} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 39 | 16 | ▶ | if ( 'ARRAY' eq ref $value ) { # one shot argument | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 40 | 16 | $self->{reason} = $value; | |||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||
| 42 | else { | ||||||||||||||||||||||||||||||||||||||
| 43 | 0 | push @{ $self->{reason} }, $value; | |||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||
| 45 | 16 | return $self->{reason}; | |||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||
| 48 | 16 | 1; | |||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||
| 50 | __END__ | ||||||||||||||||||||||||||||||||||||||