« 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
Condition100%6/6
$first ne "=" and $first ne "." and $first ne "/"
$first ne "=" and $first ne "."
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 "/"
| |||||||||||||||||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||||||||||||||||