lib/HTTP/Promise/Body/Form/Field.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 10 | 34 | 29.4 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
30 | 0 | 0 | 5 | exists $opts->{'name'} and defined $opts->{'name'} |
0 | 0 | 5 | exists $opts->{'name'} and defined $opts->{'name'} and length $opts->{'name'} | |
34 | 0 | 0 | 1 | exists $opts->{'headers'} and $self->_is_array($opts->{'headers'}) |
56 | 4 | 0 | 1 | exists $opts->{'file'} and $opts->{'file'} |
line | l | !l | condition |
---|---|---|---|
59 | 1 | 0 | 'HTTP::Promise::Body::File'->new($opts->{'file'}) || (return $self->pass_error('HTTP::Promise::Body::File'->error)) |
66 | 0 | 0 | 'HTTP::Promise::Body::Scalar'->new($opts->{'value'}) || (return $self->pass_error('HTTP::Promise::Body::Scalar'->error)) |
79 | 0 | 0 | 'HTTP::Promise::Body::File'->new($opts->{'body'}) || (return $self->pass_error('HTTP::Promise::Body::File'->error)) |
87 | 4 | 0 | 'HTTP::Promise::Body::Scalar'->new($opts->{'body'}) || (return $self->pass_error('HTTP::Promise::Body::Scalar'->error)) |
134 | 2 | 0 | $self->body || (return $self->error("No body is set for this field '$self->{'name'}'")) |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
72 | 0 | 4 | 0 | not ref $opts->{'body'} or $self->_is_scalar($opts->{'body'}) |
4 | 0 | 0 | not ref $opts->{'body'} or $self->_is_scalar($opts->{'body'}) or overload::Method($opts->{'body'}, "\"\"") | |
115 | 0 | 0 | 0 | not $body or $body->is_empty |
123 | 0 | 0 | 0 | not $body or $body->is_empty |