lib/Mail/AuthenticationResults/Token/Assignment.pm

filter: Statementstmt 100% 27 / 27 Branchbran 100% 2 / 2 Conditioncond 100% 6 / 6 MC/DCmcdc 100% 3 / 3 Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 46 / 46 CC 4 SCAR 8.5
CC
4
Cov
100%
parse
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« lib/Mail/AuthenticationResults/Header/Version.pm ↑ Summary lib/Mail/AuthenticationResults/Header/AuthServID.pm »
1 package Mail::AuthenticationResults::Token::Assignment;
2 # ABSTRACT: Class for modelling AuthenticationResults Header parts detected as assignments
3  
4 31 require 5.008;
5 31 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 31 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 31 our $VERSION = '2.20260216'; # VERSION
8 31 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 31 ▶use base 'Mail::AuthenticationResults::Token';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 1894 ▶sub is {
Subroutine is: called CC=1 SCAR=0.0
Pod documented
14 1894 my ( $self ) = @_;
15 1894 return 'assignment';
16 }
17  
18 360 ▶sub parse {
Subroutine parse: called CC=4 SCAR=13.9
Pod documented
19 360 my ($self) = @_;
20  
21 360 my $header = $self->{ 'header' };
22 360 my $value = q{};
23  
24 360 my $first = substr( $header,0,1 );
25 360 ▶ if ( $first ne '=' && $first ne '.' && $first ne '/' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($first ne "=" and $first ne "." and $first ne "/") 1 359 360
Condition100%6/6
$first ne "=" and $first ne "." and $first ne "/"
!ll&&!rl&&r
35451
$first ne "=" and $first ne "."
!ll&&!rl&&r
270846
MC/DC100%3/3
$first ne "=" and $first ne "." and $first ne "/"
$first ne "=" $first ne "." $first ne "/"
Truth table100%4/4
A and B and C
A= $first ne "="B= $first ne "."C= $first ne "/"
ABCresult
0XX0
10X0
1100
1111
26 1 croak 'not an assignment';
27 }
28  
29 359 $header = substr( $header,1 );
30  
31 359 $self->{ 'value' } = $first;
32 359 $self->{ 'header' } = $header;
33  
34 359 return;
35 }
36  
37 31 1;
38  
39 __END__
« lib/Mail/AuthenticationResults/Header/Version.pm ↑ Summary lib/Mail/AuthenticationResults/Header/AuthServID.pm »