ActionPack/Core/BaseHeaderList.pm

filter: Statementstmt 89.2% 25 / 28 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 100% 5 / 5 totaltotal 84.4% 38 / 45 CC 3 SCAR 4.6
CC
3
Cov
87%
as_string
2.0
new_from_string
2.0
add
2.0
CRAP 1.6
« ActionPack/PriorityList.pm ↑ Summary ActionPack/Util.pm »
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
BranchTrueFalseTotal
builtin::blessed($_) ? : 28 0 28
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__
« ActionPack/PriorityList.pm ↑ Summary ActionPack/Util.pm »