Branch Coverage

blib/lib/HTTP/Request/FromWget.pm
Criterion Covered Total %
branch 46 76 60.5


line true false branch
178 0 34 if ($options{'command'}) { }
0 34 elsif ($options{'command_wget'}) { }
193 0 34 unless $p->getoptionsfromarray($cmd, \my %wget_options, @option_spec)
199 34 0 wantarray ? :
222 0 0 if ($segments[-1] and $segments[-1] eq '..' || $segments[-1] eq '.')
232 0 0 if ($segments[$i] ne '..' and $segments[$i + 1] eq '..') { }
240 0 34 if (@segments < 2)
265 30 4 if (not exists $headers->{$h})
272 1 0 if ($read_files) { }
273 0 1 unless open my $fh, "<", $data
287 16 18 unless $options->{'header'}
292 3 31 if (exists $options->{'post-data'})
296 2 32 if (exists $options->{'body-data'})
301 1 33 if (my $file = $options->{'post-file'})
305 0 34 if (my $file = $options->{'body-file'})
310 34 0 unless $options->{'form'}
314 34 0 unless ($options->{'globoff'})
323 34 0 $uri->can('host_port') ? :
329 6 28 if (@post_raw_data)
335 0 34 if (@form_args) { }
6 28 elsif (defined $data) { }
341 0 0 /^([^=]+)=(.*)$/ ? :
355 6 28 if (defined $body)
359 0 34 if ($options->{'user'} or $options->{'http-user'})
360 0 0 if ($options->{'anyauth'} or $options->{'ntlm'} or $options->{'negotiate'}) { }
377 27 0 /^\s*([^:\s]+)\s*:\s*(.*)$/ ? :
381 20 14 if (defined $options->{'user-agent'})
385 1 33 if (exists $options->{'cache'})
386 0 1 unless ($options->{'cache'})
392 2 32 if (exists $options->{'http-keep-alive'})
393 1 1 unless ($options->{'http-keep-alive'})
398 1 33 if (defined $options->{'referer'})
406 118 30 unless ($headers_lc{lc $k})
412 0 34 if (defined $options->{'cookie-jar'})
416 0 34 if (defined(my $c = $options->{'cookie'}))
417 0 0 if ($c =~ /=/) { }
425 0 34 if (my $c = $options->{'compression'})
426 0 0 if ($c =~ /^(gzip|auto)$/)