| 1 | package Mail::DMARC::Report::Aggregate::Record::Row; | ||||||||||
| 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 | 16 | require Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; | |||||||||
| 10 | |||||||||||
| 11 | 54 | ▶ | sub new( $class, @args ) { | ||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 12 | 54 | ▶ | croak "invalid arguments" if @args % 2; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 54 | my %args = @args; | |||||||||
| 14 | 54 | my $self = bless {}, $class; | |||||||||
| 15 | 54 | foreach my $key ( keys %args ) { | |||||||||
| 16 | 121 | $self->$key( $args{$key} ); | |||||||||
| 17 | } | ||||||||||
| 18 | 54 | return $self; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 88 | ▶ | sub source_ip( $self, $value = undef ) { | ||||||||
|
Subroutine
source_ip: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 22 | 88 | ▶ | return $self->{source_ip} if @_ == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 53 | return $self->{source_ip} = $value; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 173 | ▶ | sub policy_evaluated( $self, @args ) { | ||||||||
|
Subroutine
policy_evaluated: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||
| 27 | |||||||||||
| 28 | 173 | ▶ | if ( !@args ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 120 | ▶ | return $self->{policy_evaluated} if $self->{policy_evaluated}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 53 | ▶ | if ( @args == 1 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 42 | ▶ | if ( 'HASH' eq ref $args[0] ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 42 | @args = %{ $args[0] }; | |||||||||
| 35 | } | ||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | return $self->{policy_evaluated} | ||||||||||
| 39 | 53 | = Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated->new(@args); | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 44 | ▶ | sub count( $self, $value = undef ) { | ||||||||
|
Subroutine
count: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 43 | 44 | ▶ | return $self->{count} if @_ == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | 42 | return $self->{count} = $value; | |||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | 16 | 1; | |||||||||
| 48 | |||||||||||
| 49 | __END__ | ||||||||||
| 50 | |||||||||||
| 51 | =pod | ||||||||||
| 52 | |||||||||||
| 53 | =head1 NAME | ||||||||||
| 54 | |||||||||||
| 55 | Mail::DMARC::Report::Aggregate::Record::Row - row section of a DMARC aggregate record | ||||||||||
| 56 | |||||||||||
| 57 | =head1 VERSION | ||||||||||
| 58 | |||||||||||
| 59 | version 2.20260827 | ||||||||||
| 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 | ||||||||||