line |
true |
false |
branch |
71
|
32 |
5 |
if (@_)
|
73
|
0 |
32 |
if (@_ == 1 and ref $_[0] eq 'HASH') { }
|
|
22 |
10 |
elsif (@_ >= 2 and defined $_[0] and $_[0] =~ /^(?:$HTTP::Promise::Request::KNOWN_METHODS)$/ || $_[0] =~ /^[A-Za-z]{3,12}$/ && !($_[0] =~ /^(?:$HTTP::Promise::Request::KNOWN_METHODS_I)$/i) and defined $_[1] && $_[1] =~ m(^(?:$HTTP::Promise::Request::RE{'URI'}{'HTTP'}|$HTTP::Promise::Request::RE{'URI'}{'HTTP'}{join $;, '-scheme', 'https'}|(?:https?\:\/{2}\[?(?:$HTTP::Promise::Request::RE{'net'}{'IPv4'}|$HTTP::Promise::Request::RE{'net'}{'IPv6'}|\:{2}1)\]?(?:\:\d+)?)|$HTTP::Promise::Request::INTL_URI_RE|/)) || !defined($_[1])) { }
|
105
|
0 |
27 |
unless $self->SUPER::init(@_)
|
143
|
0 |
0 |
unless $self->_load_class("HTTP::Promise::Entity")
|
144
|
0 |
0 |
unless $self->_load_class("HTTP::Promise::Headers")
|
147
|
0 |
0 |
if ($headers = $self->headers) { }
|
150
|
0 |
0 |
unless $ct->boundary
|
164
|
0 |
0 |
if ($self->_is_a($this, 'HTTP::Promise::Body::Form')) { }
|
|
0 |
0 |
elsif ($self->_is_a($this, 'HTTP::Promise::Body::Form::Data')) { }
|
181
|
0 |
0 |
$self->_is_array($this) ? :
|
195
|
0 |
0 |
if ($self->is_a($v, 'Module::Generic::File')) { }
|
|
0 |
0 |
elsif (ref $v eq 'HASH') { }
|
209
|
0 |
0 |
if ($def->{'file'})
|
213
|
0 |
0 |
$self->_is_a($def->{'file'}, 'Module::Generic::File') ? :
|
214
|
0 |
0 |
unless defined $f
|
218
|
0 |
0 |
if ($f and not $def->{'filename'} and !$def->{'headers'} || ref $def->{'headers'} ne 'ARRAY' && !$self->_is_a($def->{'headers'}, 'HTTP::Promise::Headers') || $self->_is_a($def->{'headers'}, 'HTTP::Promise::Headers') && $def->{'headers'}->content_disposition->index('filename') == -1)
|
232
|
0 |
0 |
if ($f and not $def->{'type'} and !$def->{'headers'} || ref $def->{'headers'} ne 'ARRAY' && !$self->_is_a($def->{'headers'}, 'HTTP::Promise::Headers') || $self->_is_a($def->{'headers'}, 'HTTP::Promise::Headers') && !$def->{'headers'}->content_type)
|
252
|
0 |
0 |
if (defined $def and ref $def eq 'HASH') { }
|
254
|
0 |
0 |
if (exists $def->{'headers'} and ref $def->{'headers'} eq 'ARRAY') { }
|
|
0 |
0 |
elsif (exists $def->{'headers'} and $self->_is_a($def->{'headers'}, 'HTTP::Promise::Headers')) { }
|
263
|
0 |
0 |
if $def->{'filename'}
|
264
|
0 |
0 |
if $def->{'type'} and not $ph->exists("Content-Type")
|
267
|
0 |
0 |
if ($def->{'file'} and $def->{'encoding'} and $def->{'file'}->length)
|
269
|
0 |
0 |
$self->_is_array($def->{'encoding'}) ? :
|
270
|
0 |
0 |
unless $self->_load_class("HTTP::Promise::Stream")
|
279
|
0 |
0 |
unless defined $bytes
|
280
|
0 |
0 |
unless $bytes
|
283
|
0 |
0 |
if scalar @$encodings
|
287
|
0 |
0 |
if ($def->{'file'}) { }
|
|
0 |
0 |
elsif ($def->{'value'}) { }
|
304
|
0 |
0 |
if defined $ph
|
305
|
0 |
0 |
if defined $body
|
317
|
2 |
5 |
unless defined $str
|
319
|
2 |
5 |
unless (defined $str and length $str)
|
321
|
0 |
2 |
ref $self ? :
|
335
|
6 |
0 |
unless defined $eol
|
338
|
3 |
3 |
if (defined $uri) { }
|
340
|
0 |
3 |
if ($self->uri_absolute) { }
|
348
|
3 |
0 |
unless length $uri
|
358
|
3 |
3 |
if (defined $proto and length $proto) { }
|
382
|
0 |
0 |
unless $self->_load_class("URL::Encode::XS")
|
383
|
0 |
0 |
if (&Encode::is_utf8($str)) { }
|
397
|
0 |
0 |
unless $self->_load_class("URL::Encode::XS")
|