Branch Coverage

blib/lib/Catmandu/Importer/Pure.pm
Criterion Covered Total %
branch 25 78 32.0


line true false branch
57 2 21 unless $self->base and $self->endpoint and $self->apiKey
60 1 20 if $self->user and not $self->password
63 1 19 if $self->filter and not is_code_ref($self->filter)
66 1 18 unless is_natural($self->timeout)
70 0 18 unless is_natural($self->max_retries)
78 2 16 unless (is_web_uri($url))
84 0 16 if (not $self->fullResponse and $self->post_xml)
85 0 0 if ($options->{'offset'} or $options->{'page'} or defined $options->{'size'} and $options->{'size'} == 0)
90 1 15 if (not $self->fullResponse and $options->{'offset'})
99 0 0 if $user
102 0 0 if $apiKey
114 2 25 if is_invocant($handler) or is_code_ref($handler)
116 23 2 if (is_string($handler) and not is_number($handler))
117 1 22 $handler =~ /^\+(.+)/ ? :
124 1 22 if ($@) { }
138 21 3 unless %$options
141 0 3 ref $options->{$_} eq 'ARRAY' ? :
156 0 0 $rcontent ? :
161 0 0 unless $res->is_success or $res->content and $res->content =~ /<\?xml/
175 0 0 $self->path ? :
178 0 0 if ($options and %$options)
191 0 0 if (not $self->fullResponse and $self->post_xml)
197 0 0 $self->post_xml ? :
199 0 0 if ($self->filter)
205 0 0 if (exists $hash->{'error'})
212 0 0 $hash->{'error'}{'description'} ? :
217 0 0 if ($self->fullResponse)
244 0 0 if not $self->_next_url and $self->_total_size and $self->_start + $self->_n >= $self->_total_size
249 0 0 if ($self->_n >= $self->_rs_size)
272 0 0 if ($self->trim_text)
280 0 0 if $subs_done
287 0 0 if ($xc->exists('/error'))
297 0 0 if $next_url
298 0 0 if $next_url
304 0 0 if ($xc->exists('/result/items')) { }
0 0 elsif ($self->endpoint eq 'changes') { }
312 0 0 if ($self->fullResponse)
324 0 0 unless $dom
326 0 0 &blessed(scalar $self->handler) ? :