| 1 | package Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; | ||||||||||||||||||||||||||||||||||||||
| 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 | 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 | 55 | ▶ | sub new( $class, @args ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 11 | 55 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 12 | 55 | my %args = @args; | |||||||||||||||||||||||||||||||||||||
| 13 | 55 | my $self = bless { reason => [] }, $class; | |||||||||||||||||||||||||||||||||||||
| 14 | 55 | foreach my $key ( keys %args ) { | |||||||||||||||||||||||||||||||||||||
| 15 | 174 | $self->$key( $args{$key} ); | |||||||||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||||||||
| 17 | 55 | return $self; | |||||||||||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||
| 20 | 90 | ▶ | sub disposition( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
disposition: called CC=6 SCAR=18.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 21 | 90 | ▶ | return $self->{disposition} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 22 | croak 'invalid disposition: ' . ( $value // '(undef)' ) | ||||||||||||||||||||||||||||||||||||||
| 23 | 55 | ▶ | 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 | 54 | return $self->{disposition} = $value; | |||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||
| 27 | 94 | ▶ | sub dkim( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
dkim: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 28 | 94 | ▶ | return $self->{dkim} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 29 | 57 | return $self->{dkim} = $value; | |||||||||||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||
| 32 | 90 | ▶ | sub spf( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
spf: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 33 | 90 | ▶ | return $self->{spf} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 34 | 55 | return $self->{spf} = $value; | |||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||
| 37 | 26 | ▶ | sub reason( $self, $value = undef ) { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
reason: called CC=4 SCAR=14.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 38 | 26 | ▶ | return $self->{reason} if @_ == 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 39 | 15 | ▶ | if ( 'ARRAY' eq ref $value ) { # one shot argument | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 40 | 15 | $self->{reason} = $value; | |||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||
| 42 | else { | ||||||||||||||||||||||||||||||||||||||
| 43 | 0 | push @{ $self->{reason} }, $value; | |||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||
| 45 | 15 | return $self->{reason}; | |||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||
| 48 | 16 | 1; | |||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||
| 50 | __END__ | ||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||
| 52 | =pod | ||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||
| 54 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||
| 56 | Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated - row/policy_evaluated section of a DMARC aggregate record | ||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||
| 58 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||
| 60 | version 2.20260827 | ||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||
| 62 | =head1 AUTHORS | ||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||
| 64 | =over 4 | ||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||
| 66 | =item * | ||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||
| 68 | Matt Simerson <msimerson@cpan.org> | ||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||
| 70 | =item * | ||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||
| 72 | Davide Migliavacca <shari@cpan.org> | ||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||
| 74 | =item * | ||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||
| 76 | Marc Bradshaw <marc@marcbradshaw.net> | ||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||
| 78 | =back | ||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||
| 80 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||
| 82 | This software is copyright (c) 2026 by Matt Simerson. | ||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||
| 84 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||||||||||||
| 85 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||
| 87 | =cut | ||||||||||||||||||||||||||||||||||||||