blib/lib/Plack/HTTPParser.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 75.8% 22 / 29 CC 1 SCAR 0.2
CC
1
Cov
78%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Plack/Loader/Shotgun.pm ↑ Summary blib/lib/Plack/Handler/HTTP/Server/PSGI.pm »
1 package Plack::HTTPParser;
2 41 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 41 ▶use parent qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 41 our @EXPORT = qw( parse_http_request );
6  
7 41 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 {
10 0 ▶ if (!$ENV{PLACK_HTTP_PARSER_PP} && try { require HTTP::Parser::XS; 1 }) {
Subroutine __ANON__: called CC=1 SCAR=0.8
Branch: 1 branch
BranchTrueFalseTotal
if (not $ENV{'PLACK_HTTP_PARSER_PP'} and &try(sub { require HTTP::Parser::XS; 1; } )) { } 0 41 41
Condition33%1/3
not $ENV{"PLACK_HTTP_PARSER_PP"} and &try(sub { require HTTP::Parser::XS; 1; } )
!ll&&!rl&&r
0410
MC/DC0%0/2
not $ENV{"PLACK_HTTP_PARSER_PP"} and &try(sub { require HTTP::Parser::XS; 1; } )
not $ENV{"PLACK_HTTP_PARSER_PP"} &try(sub { require HTTP::Parser::XS; 1; } )
Truth table33%1/3
not(A) and B
A= not $ENV{"PLACK_HTTP_PARSER_PP"}B= &try(sub { require HTTP::Parser::XS; 1; } )
ABresult
0X0
100
111
11 0 *parse_http_request = \&HTTP::Parser::XS::parse_http_request;
12 } else {
13 41 require Plack::HTTPParser::PP;
14 41 *parse_http_request = \&Plack::HTTPParser::PP::parse_http_request;
15 }
16 }
17  
18 41 1;
19  
20 __END__
« blib/lib/Plack/Loader/Shotgun.pm ↑ Summary blib/lib/Plack/Handler/HTTP/Server/PSGI.pm »