| 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
Condition33%1/3
not $ENV{"PLACK_HTTP_PARSER_PP"} and &try(sub {
require HTTP::Parser::XS;
1;
}
)
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;
}
)
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||