Branch Coverage

URI/Pure.pm
Criterion Covered Total %
branch 75 84 89.2


line true false branch
22 2 0 if defined $str
24 108 0 if defined $str
31 63 5 unless $p =~ m[\./]u or $p =~ m[/\.]u or $p =~ m[//]u
33 15 15 $p =~ m[^/]u ? :
34 7 23 $p =~ /^\./u ? :
35 12 18 $p =~ m[/$]u || $p =~ m[/\.$]u || $p =~ m[/\.\.$]u ? :
38 15 15 if $is_abs
42 2 134 unless $i
43 49 85 if ($i eq '..') { }
78 7 elsif ($i ne '.') { }
44 16 33 if ($is_abs) { }
47 21 12 if (@n and $n[0] ne '..') { }
58 15 15 $is_abs ? :
12 18 $is_dir ? :
59 7 23 if $is_dot
70 0 81 if (&Encode::is_utf8($uri))
81 36 45 if $authority
83 35 46 if $scheme
85 36 45 if ($host)
86 1 35 if ($host =~ /[^\p{ASCII}]/u) { }
88 3 0 if (/[^\p{ASCII}]/u) { }
103 73 8 if $path
105 73 8 if $path
107 35 46 if $query
137 34 0 if $self->scheme
139 32 2 if $self->{'host'}
141 1 33 if ($self->{'user'})
143 1 0 if $self->{'password'}
147 32 2 if (my $host = $self->{'host'})
148 1 31 if ($iri and $host =~ /xn--/u)
150 3 0 if (/^xn--/u) { }
161 2 32 if ($self->{'port'})
162 0 0 unless ($self->{'scheme'} eq 'http' and $self->{'port'} == 80 or $self->{'scheme'} eq 'https' and $self->{'port'} == 443)
170 32 2 if (my $path = $self->{'path'})
171 1 31 if $iri
175 14 20 if (my $query = $self->{'query'})
176 1 13 if $iri
180 5 29 if $self->{'fragment'}
199 2 26 if $self->{'scheme'}
201 2 24 if ($self->{'host'})
212 21 3 if ($self->{'path'}) { }
213 20 1 unless ($self->{'path'} =~ m[^/]u)