Branch Coverage

blib/lib/IRI.pm
Criterion Covered Total %
branch 49 104 47.1


line true false branch
140 2 24 if ($self->has_resolved_components) { }
144 24 0 unless ($self->lazy)
251 26 0 if ($v =~ /^$IRIreference$/o) { }
270 0 4 if ($base_has_authority and not $bc->{'path'}) { }
287 0 13 if ($input =~ m[^[.][.]/]) { }
0 13 elsif ($input =~ m[^[.]/]) { }
0 13 elsif ($input =~ m[^/[.]/]) { }
0 13 elsif ($input eq '/.') { }
1 12 elsif ($input =~ m[^/[.][.]/]) { }
0 12 elsif ($input eq '/..') { }
0 12 elsif ($input eq '.') { }
0 12 elsif ($input eq '..') { }
307 12 0 if ($leadingSlash)
312 7 5 if (scalar @parts)
316 12 0 if ($leadingSlash)
329 8 5 if ($self->has_base and not $self->components->{'scheme'})
339 0 8 if ($components{'scheme'}) { }
341 0 0 if (exists $components{$k})
346 0 8 if ($components{'user'} or $components{'port'} or defined $components{'host'}) { }
348 0 0 if (exists $components{$k})
355 3 5 if ($components{'path'} eq '') { }
357 0 3 if ($components{'query'}) { }
360 0 3 if ($base{'query'})
365 1 4 if ($components{'path'} =~ m[^/]) { }
372 0 5 if (defined $components{'query'})
376 8 0 if ($base{'user'} or $base{'port'} or defined $base{'host'})
378 8 16 if (exists $base{$k})
384 8 0 if (defined $base{'scheme'})
389 2 6 if (defined $components{'fragment'})
417 0 0 if (($base->scheme // '') ne ($rel->scheme // ''))
425 0 0 unless (defined $scheme or defined $auth)
434 0 0 unless defined $_
437 0 0 if ($scheme eq $bscheme)
441 0 0 unless ($scheme eq $bscheme and $auth eq $bauth)
446 0 0 unless m[^/]
463 0 0 if (scalar @rparts and (scalar @bparts and $rparts[0] ne $bparts[0])) { }
471 0 0 if $i < 0 or $i != index($bpath, '/', $li) or substr($path, $li, $i - $li) ne substr($bpath, $li, $i - $li)
482 0 0 if ($path eq $bpath) { }
484 0 0 if (defined $rel->query and defined $base->query) { }
0 0 elsif (defined $rel->query) { }
0 0 elsif (defined $base->query) { }
485 0 0 if ($rel->query eq $base->query) { }
500 0 0 if $path eq ''
520 13 1 if (my $s = $components->{'scheme'})
524 12 1 if ($components->{'user'} or $components->{'port'} or defined $components->{'host'})
527 1 12 if (my $u = $components->{'user'})
530 13 0 if (defined(my $h = $components->{'host'}))
533 1 12 if (my $p = $components->{'port'})
538 14 0 if (defined(my $p = $components->{'path'}))
542 1 13 if (defined(my $q = $components->{'query'}))
546 3 11 if (defined(my $f = $components->{'fragment'}))
563 0 0 if (defined $str)