ActionPack/Core/BaseHeaderList.pm

filter: Statementstmt 90.0% 27 / 30 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 72.7% 8 / 11 Podpod 100% 5 / 5 totaltotal 85.4% 41 / 48 CC 3 SCAR 4.3
CC
3
Cov
88%
as_string
2.0
new_from_string
2.0
add
2.0
CRAP 1.5
« ActionPack/PriorityList.pm ↑ Summary ActionPack/Util.pm »
1 package HTTP::Headers::ActionPack::Core::BaseHeaderList;
2 13 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 13 $HTTP::Headers::ActionPack::Core::BaseHeaderList::AUTHORITY = 'cpan:STEVAN';
4 }
5 {
6 13 $HTTP::Headers::ActionPack::Core::BaseHeaderList::VERSION = '0.09';
7 }
8 # ABSTRACT: A Base Header List
9  
10 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 13 ▶use Scalar::Util qw[ blessed ];
Subroutine BEGIN: called CC=1 SCAR=0.0
14 13 ▶use HTTP::Headers::ActionPack::Util qw[ split_header_words ];
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 13 ▶use parent 'HTTP::Headers::ActionPack::Core::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 5 ▶sub new_from_string {
Subroutine new_from_string: called CC=2 SCAR=6.9
Pod documented
19 5 my ($class, $header_string) = @_;
20 5 my $list = $class->new;
21 5 foreach my $header ( split_header_words( $header_string ) ) {
22 11 $list->add_header_value( $header )
23 }
24 5 $list;
25 }
26  
27 18 ▶sub as_string {
Subroutine as_string: called CC=2 SCAR=7.1
Pod documented
28 18 my $self = shift;
29 18 ▶ join ', ' => map { blessed $_ ? $_->as_string : $_ } $self->iterable;
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($_) ? : 28 0 28
30 }
31  
32 0 ▶sub add { die "Abstract method" }
Subroutine add: not called CC=1 SCAR=6.9
Pod documented
33 0 ▶sub add_header_value { die "Abstract method" }
Subroutine add_header_value: not called CC=1 SCAR=6.9
Pod documented
34 0 ▶sub iterable { die "Abstract method" }
Subroutine iterable: not called CC=1 SCAR=6.9
Pod documented
35  
36 13 1;
37  
38 __END__
« ActionPack/PriorityList.pm ↑ Summary ActionPack/Util.pm »