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