Branch Coverage

blib/lib/HTTP/Request/Generator.pm
Criterion Covered Total %
branch 47 68 69.1


line true false branch
68 11 67 ref $item ? :
78 84 defined $item ? :
77 1 189 if ($limit and @res > $limit)
107 70538 0 if ($values)
108 70490 48 if ($raw) { }
109 52795 0 exists $values->{$1} ? :
111 24 0 exists $values->{$1} ? :
120 3 194 ref $_ ne 'ARRAY' ? :
126 17 0 unless $defaults{$name}
128 1 16 if ($item)
134 0 1 if ($item =~ /\{.*\}/) { }
142 0 0 if ($i =~ /^([^{]*)\{([^}]+)\}([^{]*)/) { }
229 16 1 if ($scheme)
234 17 0 if ($host)
239 6 11 if ($port)
244 13 4 if ($path)
263 190 17576 wantarray ? :
266 17 10 if (my $pattern = delete $options{'pattern'})
279 162 0 @v ? :
309 26 17766 unless @v
318 122 17644 if (@query_params)
323 8 17758 if (@body_params)
329 17636 130 if (@url_params)
334 70538 6 if ($key ne 'host' or not $values{$key} =~ /^\[.*\]$/)
345 0 17766 unless $values{'headers'}
352 17634 132 if ($req->{'host'})
355 16 17618 if $req->{'port'} and $req->{'port'} != $uri->default_port
478 0 27 if $options{'protocol'}
481 26 1 if (wantarray) { }
509 0 0 if (keys %{$$req{'body_params'};}) { }
523 0 0 unless $req->{'query_params'}
562 0 0 if (keys %{$$req{'body_params'};}) { }
634 0 0 unless delete $env{'query_params'}
635 0 0 unless delete $env{'body_params'}