line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::Headers::ActionPack::Core::BaseHeaderList; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
13
|
|
|
13
|
|
11604
|
$HTTP::Headers::ActionPack::Core::BaseHeaderList::AUTHORITY = 'cpan:STEVAN'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$HTTP::Headers::ActionPack::Core::BaseHeaderList::VERSION = '0.09'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: A Base Header List |
9
|
|
|
|
|
|
|
|
10
|
13
|
|
|
13
|
|
84
|
use strict; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
476
|
|
11
|
13
|
|
|
13
|
|
75
|
use warnings; |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
424
|
|
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
74
|
use Scalar::Util qw[ blessed ]; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
919
|
|
14
|
13
|
|
|
13
|
|
94
|
use HTTP::Headers::ActionPack::Util qw[ split_header_words ]; |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
123
|
|
15
|
|
|
|
|
|
|
|
16
|
13
|
|
|
13
|
|
3539
|
use parent 'HTTP::Headers::ActionPack::Core::Base'; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
83
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new_from_string { |
19
|
5
|
|
|
5
|
1
|
153
|
my ($class, $header_string) = @_; |
20
|
5
|
|
|
|
|
41
|
my $list = $class->new; |
21
|
5
|
|
|
|
|
25
|
foreach my $header ( split_header_words( $header_string ) ) { |
22
|
11
|
|
|
|
|
43
|
$list->add_header_value( $header ) |
23
|
|
|
|
|
|
|
} |
24
|
5
|
|
|
|
|
39
|
$list; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub as_string { |
28
|
19
|
|
|
19
|
1
|
3131
|
my $self = shift; |
29
|
19
|
50
|
|
|
|
86
|
join ', ' => map { blessed $_ ? $_->as_string : $_ } $self->iterable; |
|
31
|
|
|
|
|
186
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub add { die "Abstract method" } |
33
|
0
|
|
|
0
|
1
|
|
sub add_header_value { die "Abstract method" } |
34
|
0
|
|
|
0
|
1
|
|
sub iterable { die "Abstract method" } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |