« lib/Mail/DMARC/Report/Aggregate/Record/Row.pm
↑ Summary
blib/lib/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm »
| 1 | package Mail::DMARC::Result::Reason; | ||||||||||||||||||||||||||||
| 2 | 11 | our $VERSION = '2.20260827'; | |||||||||||||||||||||||||||
| 3 | 11 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 11 | ▶ | use feature 'signatures'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 11 | ▶ | no warnings 'experimental::args_array_with_signatures'; ## no critic (ProhibitNoWarnings) | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 11 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 30 | ▶ | sub new( $class, @args ) { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 30 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 12 | 30 | my %args = @args; | |||||||||||||||||||||||||||
| 13 | 30 | my $self = bless {}, $class; | |||||||||||||||||||||||||||
| 14 | 30 | foreach my $key ( keys %args ) { | |||||||||||||||||||||||||||
| 15 | 48 | $self->$key( $args{$key} ); | |||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||
| 17 | 24 | return $self; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 30 | ▶ | sub type( $self, $val = undef ) { | ||||||||||||||||||||||||||
|
Subroutine
type: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||
| 21 | 30 | ▶ | return $self->{type} if @_ == 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | croak "invalid type" | ||||||||||||||||||||||||||||
| 23 | if !defined $val | ||||||||||||||||||||||||||||
| 24 | 30 | ▶ | || 0 == grep {/^$val$/ix} | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not defined $val or 0 == grep({/^$val$/xi;} "forwarded", "sampled_out", "trusted_forwarder", "mailing_list", "local_policy", "other")
MC/DC100%2/2
not defined $val or 0 == grep({/^$val$/xi;} "forwarded", "sampled_out", "trusted_forwarder", "mailing_list", "local_policy", "other")
not defined $val
0 == grep({/^$val$/xi;} "forwarded", "sampled_out", "trusted_forwarder", "mailing_list", "local_policy", "other")
Truth table100%3/3
not(A) or B
A= not defined $valB= 0 == grep({/^$val$/xi;} "forwarded", "sampled_out", "trusted_forwarder", "mailing_list", "local_policy", "other")
| |||||||||||||||||||||||||||||
| 25 | qw/ forwarded sampled_out trusted_forwarder | ||||||||||||||||||||||||||||
| 26 | mailing_list local_policy other /; | ||||||||||||||||||||||||||||
| 27 | 23 | return $self->{type} = $val; | |||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 27 | ▶ | sub comment( $self, $val = undef ) { | ||||||||||||||||||||||||||
|
Subroutine
comment: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 31 | 27 | ▶ | return $self->{comment} if @_ == 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | # comment is optional and requires no validation | ||||||||||||||||||||||||||||
| 34 | 22 | return $self->{comment} = $val; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 11 | 1; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | __END__ | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | =pod | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | =head1 NAME | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | Mail::DMARC::Result::Reason - policy override reason | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | =head1 VERSION | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | version 2.20260827 | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | =head1 METHODS | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | =head2 type | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | Type is the type of override used, and is one of a number of fixed strings. | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =head2 comment | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | Comment may or may not be present, and may be anything. | ||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||