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