« 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 | 32 | require 5.008; | |||||||||
| 5 | 32 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 32 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 32 | our $VERSION = '2.20261029'; # VERSION | |||||||||
| 8 | 32 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 32 | ▶ | use base 'Mail::AuthenticationResults::Token'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 14830 | ▶ | sub is { | ||||||||
|
Subroutine
is: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | 14830 | my ( $self ) = @_; | |||||||||
| 15 | 14830 | return 'separator'; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 4134 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 19 | 4134 | my ($self) = @_; | |||||||||
| 20 | |||||||||||
| 21 | 4134 | my $header = $self->{ 'header' }; | |||||||||
| 22 | 4134 | my $value = q{}; | |||||||||
| 23 | |||||||||||
| 24 | 4134 | my $first = substr( $header,0,1 ); | |||||||||
| 25 | 4134 | ▶ | croak 'not a separator' if $first ne ';'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | |||||||||||
| 27 | 4133 | $header = substr( $header,1 ); | |||||||||
| 28 | |||||||||||
| 29 | 4133 | $self->{ 'value' } = ';'; | |||||||||
| 30 | 4133 | $self->{ 'header' } = $header; | |||||||||
| 31 | |||||||||||
| 32 | 4133 | return; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 32 | 1; | |||||||||
| 36 | |||||||||||
| 37 | __END__ | ||||||||||