Branch Coverage

blib/lib/URI/Builder.pm
Criterion Covered Total %
branch 78 88 88.6


line true false branch
49 1 133 ref $_ eq 'HASH' ? :
7 134 ref $_ eq 'ARRAY' ? :
61 1 6 unless defined $v
135 75 146 unless $$self{$field}
136 16 205 if @_
142 0 248 if @_
144 12 24 $listish{$field} ? :
177 0 34 @_ == 1 && ref $_[0] eq 'HASH' ? :
181 9 25 if (my $uri = $opts{'uri'})
185 69 3 if (not defined $opts{$field} and my $code = $uri->can($field))
186 27 42 $listish{$field} ? :
203 14 0 if (my $method = $self->can($field))
208 0 34 if (my(@invalid) = sort(keys %opts))
219 4 7 if (blessed $thing) { }
220 4 0 if ($thing->isa('URI')) { }
0 0 elsif ($thing->isa('URI::Builder')) { }
283 0 3 unless $clone{$list}
303 28 16 if (my $authority = $self->authority)
304 22 6 if (my $scheme = $self->scheme)
313 20 24 if (my $path = $self->path)
314 13 7 if @parts
318 15 29 if (my $query = $self->query)
322 3 41 if (my $fragment = $self->fragment)
375 1 27 $user ? :
28 16 $host ? :
388 16 12 $port ? :
28 16 $host ? :
407 6 48 if (@_)
428 1 48 if ($query)
433 0 49 unless (defined wantarray)
440 15 34 if (my(@form) = $self->query_form) { }
441 1 14 if @form % 2
466 2 0 $query ? :
468 1 1 if (@_)
499 12 6 if ($key) { }
503 2 10 if (@values)
507 1 1 @indices ? :
513 1 1 if (@values)
520 11 1 wantarray ? :
572 2 6 @_ == 1 && ref $_[0] eq 'HASH' ? :
4 4 if (my(%form) = @_ == 1 && ref $_[0] eq 'HASH' ? %{$_[0];} : @_)
576 3 5 unless (defined wantarray)
584 4 3 @values == 1 ? :
587 1 4 if @new