line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DMARC::Result::Reason; |
2
|
|
|
|
|
|
|
our $VERSION = '1.20210927'; |
3
|
7
|
|
|
7
|
|
49
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
203
|
|
4
|
7
|
|
|
7
|
|
38
|
use warnings; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
172
|
|
5
|
|
|
|
|
|
|
|
6
|
7
|
|
|
7
|
|
37
|
use Carp; |
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
1998
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
21
|
|
|
21
|
0
|
61
|
my ( $class, @args ) = @_; |
10
|
21
|
50
|
|
|
|
68
|
croak "invalid arguments" if @args % 2; |
11
|
21
|
|
|
|
|
66
|
my %args = @args; |
12
|
21
|
|
|
|
|
65
|
my $self = bless {}, $class; |
13
|
21
|
|
|
|
|
77
|
foreach my $key ( keys %args ) { |
14
|
33
|
|
|
|
|
128
|
$self->$key( $args{$key} ); |
15
|
|
|
|
|
|
|
} |
16
|
15
|
|
|
|
|
76
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub type { |
20
|
21
|
50
|
|
21
|
1
|
62
|
return $_[0]->{type} if 1 == scalar @_; |
21
|
|
|
|
|
|
|
croak "invalid type" |
22
|
21
|
100
|
|
|
|
43
|
if 0 == grep {/^$_[1]$/ix} |
|
126
|
|
|
|
|
1181
|
|
23
|
|
|
|
|
|
|
qw/ forwarded sampled_out trusted_forwarder |
24
|
|
|
|
|
|
|
mailing_list local_policy other /; |
25
|
15
|
|
|
|
|
67
|
return $_[0]->{type} = $_[1]; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub comment { |
29
|
13
|
100
|
|
13
|
1
|
5031
|
return $_[0]->{comment} if 1 == scalar @_; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# comment is optional and requires no validation |
32
|
12
|
|
|
|
|
127
|
return $_[0]->{comment} = $_[1]; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |