« lib/Mail/AuthenticationResults/Token/Separator.pm
↑ Summary
lib/Mail/AuthenticationResults/Token/Space.pm »
| 1 | package Mail::AuthenticationResults::Token; | ||
| 2 | # ABSTRACT: Base class for modelling AuthenticationResults Header parts | ||
| 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 | |||
| 11 | sub new { | ||
| 12 | 1263 | ▶ | my ( $class, $header, $args ) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | |||
| 14 | 1263 | my $self = { 'args' => $args }; | |
| 15 | 1263 | bless $self, $class; | |
| 16 | |||
| 17 | 1263 | $self->{ 'header' } = $header; | |
| 18 | 1263 | $self->parse(); | |
| 19 | |||
| 20 | 1249 | return $self; | |
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | sub new_from_value { | ||
| 25 | 1375 | ▶ | my ( $class, $value ) = @_; |
|
Subroutine
new_from_value: called CC=1 SCAR=0.0
Pod
documented
| |||
| 26 | |||
| 27 | 1375 | my $self = { 'value' => $value }; | |
| 28 | 1375 | bless $self, $class; | |
| 29 | |||
| 30 | 1375 | return $self; | |
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | sub value { | ||
| 35 | 3484 | ▶ | my ( $self ) = @_; |
|
Subroutine
value: called CC=1 SCAR=0.0
Pod
documented
| |||
| 36 | 3484 | return $self->{ 'value' }; | |
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | sub remainder { | ||
| 41 | 1249 | ▶ | my ( $self ) = @_; |
|
Subroutine
remainder: called CC=1 SCAR=0.0
Pod
documented
| |||
| 42 | 1249 | return $self->{ 'header' }; | |
| 43 | } | ||
| 44 | |||
| 45 | |||
| 46 | sub parse { | ||
| 47 | 1 | ▶ | my ( $self ) = @_; |
|
Subroutine
parse: called CC=1 SCAR=0.0
Pod
documented
| |||
| 48 | 1 | croak 'parse not implemented'; | |
| 49 | } | ||
| 50 | |||
| 51 | |||
| 52 | sub is { # uncoverable subroutine | ||
| 53 | # a base Token cannot be instantiated, and all subclasses should implement this method. | ||
| 54 | 0 | ▶ | my ( $self ) = @_; # uncoverable statement |
|
Subroutine
is: not called CC=1 SCAR=0.0
Pod
documented
| |||
| 55 | 0 | croak 'is not implemented'; # uncoverable statement | |
| 56 | } | ||
| 57 | |||
| 58 | 30 | 1;; | |
| 59 | |||
| 60 | __END__ | ||