Branch Coverage

lib/HTTP/Promise/Body/Form.pm
Criterion Covered Total %
branch 30 86 34.8


line true false branch
33 11 2 if (@_) { }
36 5 6 if (ref $data eq 'HASH') { }
6 0 elsif (not ref $data or ref $data ne 'HASH' and overload::Method($data, '""')) { }
62 0 0 unless $self->SUPER::init(@_)
71 0 0 unless $self->_load_class("HHTP::Promise::Body::Form")
76 0 0 if ($self->_is_array($v)) { }
80 0 0 $self->_is_a($v2, 'HTTP::Promise::Body::Form::Field') ? :
86 0 0 if (exists $form->{$n}) { }
88 0 0 unless $self->_is_array($form->{$n})
99 0 0 $self->_is_a($v, 'HTTP::Promise::Body::Form::Field') ? :
105 0 0 if (exists $form->{$n}) { }
107 0 0 unless $self->_is_array($form->{$n})
123 0 1 if (@_ and $self->_tie_object->_is_array($_[0])) { }
140 1 3 if (ref $v eq 'ARRAY') { }
144 0 2 if ($self->_is_a($v2, "HTTP::Promise::Body::Form::Field"))
148 0 0 if ref $v2 and not overload::Method($v2, "\"\"") and $self->_is_warnings_enabled
154 0 3 if ($self->_is_a($v, "HTTP::Promise::Body::Form::Field"))
158 0 0 if ref $v and not overload::Method($v, "\"\"") and $self->_is_warnings_enabled
163 0 1 if ($@)
176 0 1 if not defined $data && CORE::length "$data" and $self->_is_warnings_enabled
177 0 1 if ref $data and not overload::Method($data, "\"\"")
185 0 1 if ($@)
197 0 6 if not defined $data && CORE::length "$data" and $self->_is_warnings_enabled
198 0 6 if ref $data and not overload::Method($data, "\"\"")
206 0 6 if ($@)
216 0 6 $self->_is_array($_[0]) ? :
217 0 6 unless defined $ref
221 3 11 if (exists $hash->{$n}) { }
223 2 1 unless ref $hash->{$n} eq "ARRAY"
239 0 1 if ref $ref ne "ARRAY" and ref $ref ne "HASH"
241 0 1 ref $ref eq 'ARRAY' ? :
242 0 1 unless scalar @$this
251 0 1 if (ref $v eq 'ARRAY') { }
255 0 0 if ($self->_is_a($v2, "HTTP::Promise::Body::Form::Field"))
259 0 0 if ref $v2 and not overload::Method($v2, "\"\"") and $self->_is_warnings_enabled
265 0 1 if ($self->_is_a($v, "HTTP::Promise::Body::Form::Field"))
269 0 0 if ref $v and not overload::Method($v, "\"\"") and $self->_is_warnings_enabled
275 0 1 if ($@)
292 0 1 if ($@)
312 0 0 unless defined $encoded
333 0 0 unless $self->_tie_object->_is_glob($fh) or $self->_tie_object->_is_a($fh, "HTTP::Promise::IO")
335 0 0 unless defined $encoded
336 0 0 unless $fh->print($encoded)