lib/Mail/AuthenticationResults/Token/Separator.pm

filter: Statementstmt 100% 26 / 26 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 36 / 36 CC 2 SCAR 2.5
CC
2
Cov
100%
parse
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« lib/Mail/AuthenticationResults/Header/SubEntry.pm ↑ Summary lib/Mail/AuthenticationResults/Token.pm »
1 package Mail::AuthenticationResults::Token::Separator;
2 # ABSTRACT: Class for modelling AuthenticationResults Header parts detected as separators
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 830 ▶sub is {
Subroutine is: called CC=1 SCAR=0.0
Pod documented
14 830 my ( $self ) = @_;
15 830 return 'separator';
16 }
17  
18 134 ▶sub parse {
Subroutine parse: called CC=2 SCAR=6.9
Pod documented
19 134 my ($self) = @_;
20  
21 134 my $header = $self->{ 'header' };
22 134 my $value = q{};
23  
24 134 my $first = substr( $header,0,1 );
25 134 ▶ croak 'not a separator' if $first ne ';';
Branch: 1 branch
BranchTrueFalseTotal
if $first ne ";" 1 133 134
26  
27 133 $header = substr( $header,1 );
28  
29 133 $self->{ 'value' } = ';';
30 133 $self->{ 'header' } = $header;
31  
32 133 return;
33 }
34  
35 31 1;
36  
37 __END__
« lib/Mail/AuthenticationResults/Header/SubEntry.pm ↑ Summary lib/Mail/AuthenticationResults/Token.pm »