Branch Coverage

blib/lib/REST/Client.pm
Criterion Covered Total %
branch 21 50 42.0


line true false branch
26 2 1 if (ref $_[0] eq 'HASH') { }
0 1 elsif (scalar @_ and scalar @_ % 2 == 0) { }
128 0 21 unless $url
129 0 21 if $headers and ref $headers ne "HASH"
135 0 21 if (defined $self->getTimeout) { }
143 0 21 if (defined $content and length $content) { }
161 0 21 if ($self->getCert)
162 0 0 unless $url =~ /^https/
163 0 0 unless -f $self->getCert and -f $self->getKey
170 0 21 if (my $ca = $self->getCa)
171 0 0 unless -f $ca
176 0 21 if ($self->getPkcs12)
177 0 0 unless $url =~ /^https/
178 0 0 unless -f $self->getPkcs12
181 0 0 if ($self->getPkcs12password)
186 0 21 $self->getFollow ? :
219 0 1 unless $header
232 0 0 if ($self->responseHeader('Content-type') =~ /html/) { }
246 0 21 if $url =~ /^https?:/
249 21 0 if ($host)
250 0 21 unless $url =~ m[^/]
253 21 0 unless ($url =~ m[^\w+://])
254 0 21 $self->getCert ? :
263 21 3 if $self->getUseragent
275 2 1 if $self->can("setHost")