ActionPack/Core/BaseHeaderType.pm

filter: Statementstmt 100% 30 / 30 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 100% 4 / 4 totaltotal 97.8% 45 / 46 CC 2 SCAR 1.7
CC
2
Cov
97%
BUILDARGS
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« ActionPack/DateHeader.pm ↑ Summary ActionPack/Core/BaseAuthHeader.pm »
1 package HTTP::Headers::ActionPack::Core::BaseHeaderType;
2 11 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 $HTTP::Headers::ActionPack::Core::BaseHeaderType::AUTHORITY = 'cpan:STEVAN';
4 }
5 {
6 11 $HTTP::Headers::ActionPack::Core::BaseHeaderType::VERSION = '0.09';
7 }
8 # ABSTRACT: A Base header type
9  
10 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 11 ▶use Carp qw[ confess ];
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 11 ▶use HTTP::Headers::ActionPack::Util qw[
Subroutine BEGIN: called CC=1 SCAR=0.0
16 split_header_words
17 join_header_words
18 11 ];
19  
20 11 ▶use parent 'HTTP::Headers::ActionPack::Core::BaseHeaderWithParams';
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 192 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=2 SCAR=7.0
Pod documented
23 192 my $class = shift;
24 192 my ($subject, @params) = @_;
25  
26 192 ▶ confess "You must specify a subject" unless $subject;
Branch: 1 branch
BranchTrueFalseTotal
unless $subject 0 192 192
27  
28 return +{
29 subject => $subject,
30 192 %{ $class->_prepare_params( @params ) }
31 };
32 }
33  
34 859 ▶sub subject { (shift)->{'subject'} }
Subroutine subject: called CC=1 SCAR=0.0
Pod documented
35  
36 78 ▶sub new_from_string {
Subroutine new_from_string: called CC=1 SCAR=0.0
Pod documented
37 78 my ($class, $header_string) = @_;
38 78 $class->new( @{ (split_header_words( $header_string ))[0] } );
39 }
40  
41 242 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
42 242 my $self = shift;
43 242 join_header_words( $self->subject, $self->params_in_order );
44 }
45  
46 11 1;
47  
48 __END__
« ActionPack/DateHeader.pm ↑ Summary ActionPack/Core/BaseAuthHeader.pm »