Branch Coverage

blib/lib/Rose/URI.pm
Criterion Covered Total %
branch 103 132 78.0


line true false branch
82 23 0 if (@_ == 1) { }
111 0 27 unless (defined $query and $query =~ /\S/)
119 22 5 if (index($query, '&') >= 0) { }
3 2 elsif (index($query, ';') >= 0) { }
2 0 elsif (index($query, '=') < 0) { }
134 0 25 unless @params
142 0 78 unless defined $param
144 25 53 if (exists $query{$param}) { }
146 0 25 if (ref $query{$param}) { }
170 1 1 wantarray ? :
177 1 5 if (@_)
179 1 0 $_[0] ? :
182 1 4 defined $$self{'omit_empty_query_params'} ? :
190 117 15 if (@_ == 1) { }
15 0 elsif (@_ == 2) { }
192 115 2 if exists $$self{'query'}{$_[0]}
199 6 9 if (ref $_[1])
214 1 118 unless @_
218 57 10 defined $params ? :
51 67 ref $params ? :
221 109 9 wantarray ? :
228 0 5 unless @_ == 3
232 1 4 ref $value ? :
234 3 2 @$params > 1 ? :
236 0 5 wantarray ? :
243 0 7 unless defined $param
252 0 3 unless @_
256 1 2 if (defined $$self{'query_string'} and $param eq $$self{'query_string'})
275 24 7 length $scheme ? :
20 11 length $user ? :
24 7 length $port ? :
31 0 length $query ? :
30 1 length $frag ? :
288 6 48 if (@_ == 1) { }
1 47 elsif (@_) { }
290 2 4 if (ref $_[0]) { }
306 7 47 unless defined wantarray
308 3 44 if (defined $$self{'query_string'})
321 4 4 defined $omit_empty ? :
4 4 unless (@values or defined $omit_empty ? $omit_empty : ($omit_empty = $self->omit_empty_query_params))
339 1 1 if (@_)
350 1 1 unless defined wantarray
369 1 4 unless $base and not length $self->scheme
376 0 4 unless $base =~ m[^$SCHEME_RE://]o
384 1 5 unless $base
388 2 3 if ($uri =~ m[^$base/?])
405 0 0 if (length $user and length $pass)
410 0 0 if length $user
421 20 11 if (length $user and length $pass)
426 0 11 if length $user
455 0 23 if ($uri->can('user')) { }
14 9 elsif ($uri->can('userinfo')) { }
461 10 4 if (my $userinfo = $uri->userinfo)
463 10 0 if (my($user, $pass) = split(/:/, $userinfo, 3))
472 14 9 if $uri->can('host')
473 14 9 if $uri->can('_port')
474 23 0 if $uri->can('path')
511 0 0 defined $_[1] ? :
0 31 @_ > 1 ? :
520 0 10 unless my $ref_type = ref $data
524 5 5 if ($ref_type eq 'HASH') { }
4 1 elsif ($ref_type eq 'ARRAY') { }
0 1 elsif ($ref_type eq 'REF' or $ref_type eq 'SCALAR') { }
1 0 elsif ($ref_type->isa('Rose::URI')) { }
527 31 5 !ref($_) ? :
532 8 0 !ref($_) ? :