| 1 | package HTTP::Headers::ActionPack::Core::BaseHeaderList; | ||||||||||
| 2 | # ABSTRACT: A Base Header List | ||||||||||
| 3 | |||||||||||
| 4 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 12 | our $VERSION = '0.10'; | |||||||||
| 8 | |||||||||||
| 9 | 12 | ▶ | use Scalar::Util qw[ blessed ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 12 | ▶ | use HTTP::Headers::ActionPack::Util qw[ split_header_words ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 12 | ▶ | use parent 'HTTP::Headers::ActionPack::Core::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 5 | ▶ | sub new_from_string { | ||||||||
|
Subroutine
new_from_string: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 15 | 5 | my ($class, $header_string) = @_; | |||||||||
| 16 | 5 | my $list = $class->new; | |||||||||
| 17 | 5 | foreach my $header ( split_header_words( $header_string ) ) { | |||||||||
| 18 | 11 | $list->add_header_value( $header ) | |||||||||
| 19 | } | ||||||||||
| 20 | 5 | $list; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 18 | ▶ | sub as_string { | ||||||||
|
Subroutine
as_string: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 24 | 18 | my $self = shift; | |||||||||
| 25 | 18 | ▶ | join ', ' => map { blessed $_ ? $_->as_string : $_ } $self->iterable; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub add { die "Abstract method" } | ||||||||
|
Subroutine
add: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | sub add_header_value { die "Abstract method" } | ||||||||
|
Subroutine
add_header_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 0 | ▶ | sub iterable { die "Abstract method" } | ||||||||
|
Subroutine
iterable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 31 | |||||||||||
| 32 | 12 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||