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