Branch Coverage

blib/lib/IRI.pm
Criterion Covered Total %
branch 81 104 77.8


line true false branch
140 2 186 if ($self->has_resolved_components) { }
144 186 0 unless ($self->lazy)
251 188 0 if ($v =~ /^$IRIreference$/o) { }
270 0 21 if ($base_has_authority and not $bc->{'path'}) { }
287 0 78 if ($input =~ m[^[.][.]/]) { }
0 78 elsif ($input =~ m[^[.]/]) { }
2 76 elsif ($input =~ m[^/[.]/]) { }
1 75 elsif ($input eq '/.') { }
8 67 elsif ($input =~ m[^/[.][.]/]) { }
2 65 elsif ($input eq '/..') { }
0 65 elsif ($input eq '.') { }
0 65 elsif ($input eq '..') { }
307 65 0 if ($leadingSlash)
312 42 23 if (scalar @parts)
316 65 0 if ($leadingSlash)
329 30 109 if ($self->has_base and not $self->components->{'scheme'})
339 0 30 if ($components{'scheme'}) { }
341 0 0 if (exists $components{$k})
346 1 29 if ($components{'user'} or $components{'port'} or defined $components{'host'}) { }
348 1 4 if (exists $components{$k})
355 6 23 if ($components{'path'} eq '') { }
357 1 5 if ($components{'query'}) { }
360 2 3 if ($base{'query'})
365 2 21 if ($components{'path'} =~ m[^/]) { }
372 3 20 if (defined $components{'query'})
376 29 0 if ($base{'user'} or $base{'port'} or defined $base{'host'})
378 29 58 if (exists $base{$k})
384 30 0 if (defined $base{'scheme'})
389 6 24 if (defined $components{'fragment'})
417 4 40 if (($base->scheme // '') ne ($rel->scheme // ''))
425 0 0 unless (defined $scheme or defined $auth)
434 0 120 unless defined $_
437 40 0 if ($scheme eq $bscheme)
441 6 34 unless ($scheme eq $bscheme and $auth eq $bauth)
446 0 68 unless m[^/]
463 2 32 if (scalar @rparts and (scalar @bparts and $rparts[0] ne $bparts[0])) { }
471 5 33 if $i < 0 or $i != index($bpath, '/', $li) or substr($path, $li, $i - $li) ne substr($bpath, $li, $i - $li)
482 8 24 if ($path eq $bpath) { }
484 3 5 if (defined $rel->query and defined $base->query) { }
1 4 elsif (defined $rel->query) { }
1 3 elsif (defined $base->query) { }
485 2 1 if ($rel->query eq $base->query) { }
500 1 23 if $path eq ''
520 84 48 if (my $s = $components->{'scheme'})
524 89 42 if ($components->{'user'} or $components->{'port'} or defined $components->{'host'})
527 1 89 if (my $u = $components->{'user'})
530 90 0 if (defined(my $h = $components->{'host'}))
533 10 80 if (my $p = $components->{'port'})
538 132 0 if (defined(my $p = $components->{'path'}))
542 26 106 if (defined(my $q = $components->{'query'}))
546 38 94 if (defined(my $f = $components->{'fragment'}))
563 0 0 if (defined $str)