Branch Coverage

blib/lib/HTTP/Request/FromCurl.pm
Criterion Covered Total %
branch 106 126 84.1


line true false branch
218 1 122 if ($options{'command'}) { }
0 122 elsif ($options{'command_curl'}) { }
231 1 781 if $_ eq "-:"
238 0 123 unless $p->getoptionsfromarray($cmd, \my %curl_options, @option_spec)
242 122 1 unless $curl_options{'url'}
245 122 1 wantarray ? :
268 7 4 if ($segments[-1] and $segments[-1] eq '..' || $segments[-1] eq '.')
278 13 18 if ($segments[$i] ne '..' and $segments[$i + 1] eq '..') { }
286 11 134 if (@segments < 2)
295 2 470 if (exists $headers->{$h}) { }
296 2 0 unless (ref $headers->{$h})
307 12 1 if ($read_files) { }
308 6 6 if ($data =~ /^\@(.*)/u) { }
309 0 6 unless open my $fh, "<", $1
318 1 0 $data =~ /^\@(.*)/u ? :
327 4 0 if ($read_files) { }
328 1 3 if ($data =~ /^<(.*)/u) { }
1 2 elsif ($data =~ /^\@(.*)/u) { }
329 0 1 unless open my $fh, "<", $1
341 0 0 if ($data =~ /^[<\@](.*)/u) { }
352 104 29 unless $options->{'header'}
355 126 7 unless $options->{'data'}
356 132 1 unless $options->{'data-ascii'}
359 121 12 unless $options->{'data-raw'}
361 132 1 unless $options->{'data-urlencode'}
362 130 3 unless $options->{'data-binary'}
363 132 1 unless $options->{'json'}
366 2 131 if ($options->{'form'})
370 4 0 /^([^=]+)=(.*)$/u ? :
374 2 131 if ($options->{'form-string'})
375 3 1 /^([^=]+)=(.*)$/u ? :
380 80 53 unless ($options->{'globoff'})
384 1 132 if ($options->{'max-filesize'} and $options->{'max-filesize'} =~ /^(\d+)([kmg])$/iu)
399 131 4 $uri->can('host_port') ? :
421 0 1 unless /\A([^\@=]*)([=\@])?(.*)\z/msu
424 0 1 if (not $op) { }
1 0 elsif ($op eq '@') { }
429 0 1 if (defined $name and length $name) { }
439 24 111 if (@post_read_data or @post_binary_data or @post_raw_data or @post_urlencode_data) { }
1 110 elsif (@post_json_data) { }
454 4 131 if (@form_args) { }
2 129 elsif ($options->{'get'}) { }
2 127 elsif ($options->{'head'}) { }
23 104 elsif (defined $data) { }
468 2 0 if ($data)
470 1 1 if (defined $q and length $q) { }
486 1 22 if (@post_json_data) { }
498 23 112 if (defined $body)
502 1 134 if ($options->{'oauth2-bearer'})
506 3 132 if ($options->{'user'})
507 0 3 if ($options->{'anyauth'} or $options->{'digest'} or $options->{'ntlm'} or $options->{'negotiate'}) { }
525 39 0 /^\s*([^:\s]+)\s*:\s*(.*)$/u ? :
529 60 75 if (defined $options->{'user-agent'})
533 0 135 if (defined $options->{'referrer'})
537 0 135 if (defined $options->{'range'})
545 240 76 unless ($headers_lc{lc $k})
549 131 4 unless ($headers{'Host'})
553 1 134 if (defined $options->{'cookie-jar'})
557 3 132 if (defined(my $c = $options->{'cookie'}))
558 2 1 if ($c =~ /=/u) { }
573 2 133 if ($options->{'compressed'})
580 0 405 if ($options->{$kind})
603 4 131 scalar @form_args ? :