Branch Coverage

blib/lib/HTTP/Request/FromCurl.pm
Criterion Covered Total %
branch 55 118 46.6


line true false branch
215 1 4 if ($options{'command'}) { }
0 4 elsif ($options{'command_curl'}) { }
228 0 28 if $_ eq "-:"
235 0 5 unless $p->getoptionsfromarray($cmd, \my %curl_options, @option_spec)
239 5 0 unless $curl_options{'url'}
242 4 1 wantarray ? :
265 6 4 if ($segments[-1] and $segments[-1] eq '..' || $segments[-1] eq '.')
275 12 16 if ($segments[$i] ne '..' and $segments[$i + 1] eq '..') { }
283 11 8 if (@segments < 2)
292 0 30 if (exists $headers->{$h}) { }
293 0 0 unless (ref $headers->{$h})
304 0 1 if ($read_files) { }
305 0 0 if ($data =~ /^\@(.*)/) { }
306 0 0 unless open my $fh, "<", $1
315 1 0 $data =~ /^\@(.*)/ ? :
324 0 0 if ($read_files) { }
325 0 0 if ($data =~ /^<(.*)/) { }
0 0 elsif ($data =~ /^\@(.*)/) { }
326 0 0 unless open my $fh, "<", $1
338 0 0 if ($data =~ /^[<\@](.*)/) { }
350 7 1 unless $options->{'header'}
353 7 1 unless $options->{'data'}
354 8 0 unless $options->{'data-ascii'}
357 8 0 unless $options->{'data-raw'}
359 8 0 unless $options->{'data-urlencode'}
360 8 0 unless $options->{'data-binary'}
363 0 8 if ($options->{'form'})
367 0 0 /^([^=]+)=(.*)$/ ? :
371 0 8 if ($options->{'form-string'})
372 0 0 /^([^=]+)=(.*)$/ ? :
377 4 4 unless ($options->{'globoff'})
386 5 4 $uri->can('host_port') ? :
404 0 0 unless /\A([^\@=]*)([=\@])?(.*)\z/ms
407 0 0 if (not $op) { }
0 0 elsif ($op eq '@') { }
412 0 0 if (defined $name and length $name) { }
422 0 8 if (@post_read_data or @post_binary_data or @post_raw_data or @post_urlencode_data)
435 0 9 if (@form_args) { }
0 9 elsif ($options->{'get'}) { }
0 9 elsif ($options->{'head'}) { }
1 8 elsif (defined $data) { }
449 0 0 if ($data)
451 0 0 if (defined $q and length $q) { }
472 1 8 if (defined $body)
476 0 9 if ($options->{'oauth2-bearer'})
480 1 8 if ($options->{'user'})
481 0 1 if ($options->{'anyauth'} or $options->{'digest'} or $options->{'ntlm'} or $options->{'negotiate'}) { }
499 2 0 /^\s*([^:\s]+)\s*:\s*(.*)$/ ? :
503 0 9 if (defined $options->{'user-agent'})
507 0 9 if (defined $options->{'referrer'})
511 0 9 if (defined $options->{'range'})
519 19 1 unless ($headers_lc{lc $k})
523 9 0 unless ($headers{'Host'})
527 0 9 if (defined $options->{'cookie-jar'})
531 0 9 if (defined(my $c = $options->{'cookie'}))
532 0 0 if ($c =~ /=/) { }
547 0 9 if ($options->{'compressed'})
554 0 27 if ($options->{$kind})
575 0 9 scalar @form_args ? :