URI/http.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 4 / 4 Conditioncond 83.3% 5 / 6 MC/DCmcdc 66.6% 2 / 3 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 94.8% 37 / 39 CC 5 SCAR 11.7
CC
5
Cov
97%
canonical
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.2
« URI/otpauth.pm ↑ Summary URI/_idna.pm »
1 package URI::http;
2  
3 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 30 our $VERSION = '5.40';
7  
8 30 ▶use parent 'URI::_server';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 46 ▶sub default_port {80}
Subroutine default_port: called CC=1 SCAR=0.0
Pod documented
11  
12 384 ▶sub canonical {
Subroutine canonical: called CC=5 SCAR=16.1
Pod documented
13 384 my $self = shift;
14 384 my $other = $self->SUPER::canonical;
15  
16 384 ▶ my $slash_path
Condition83%5/6
defined $other->authority && !length($other->path) && !defined($other->query)
!ll&&!rl&&r
361023
defined $other->authority and not length $other->path
!ll&&!rl&&r
6429723
MC/DC66%2/3
defined $other->authority && !length($other->path) && !defined($other->query)
defined $other->authority not length $other->path !defined($other->query)
Truth table75%3/4
A and not(B) && not(C)
A= defined $other->authorityB= not length $other->pathC= !defined($other->query)
ABCresult
0XX0
10X0
1100
1111
17 = defined($other->authority)
18 && !length($other->path)
19 && !defined($other->query);
20  
21 384 ▶ if ($slash_path) {
Branch: 1 branch
BranchTrueFalseTotal
if ($slash_path) 23 361 384
22 23 ▶ $other = $other->clone if $other == $self;
Branch: 1 branch
BranchTrueFalseTotal
if $other == $self 12 11 23
23 23 $other->path("/");
24 }
25 384 $other;
26 }
27  
28 30 1;
« URI/otpauth.pm ↑ Summary URI/_idna.pm »