Branch Coverage

blib/lib/App/Kramerius/To/Images.pm
Criterion Covered Total %
branch 18 54 33.3


line true false branch
41 2 1 if (defined $self->{'lwp_user_agent'}) { }
42 1 1 unless ($self->{'lwp_user_agent'}->isa("LWP::UserAgent"))
64 0 1 if (not &getopts("hqv", $self->{'_opts'}) or not -r "ROOT" and @ARGV < 2 or $self->{'_opts'}{'h'})
79 1 0 if (@ARGV > 1) { }
0 0 elsif (-r 'ROOT') { }
90 1 0 if ($self->{'dir_to_store_files'}) { }
97 0 1 unless (defined $self->{'_kramerius_obj'})
106 0 1 if ($self->{'_opts'}{'v'})
111 0 1 if ($self->{'_kramerius_obj'}->version == 3) { }
1 0 elsif ($self->{'_kramerius_obj'}->version == 4) { }
118 0 0 if ($self->{'_opts'}{'v'})
124 0 0 if ($res->is_success) { }
135 0 0 unless (@page_uris)
143 0 0 unless (-r $path_segments[-1])
144 0 0 unless ($self->{'_opts'}{'q'})
173 1 0 if ($res->is_success) { }
183 0 1 if ($res->headers->content_type ne "application/json")
192 0 1 if ($App::Kramerius::To::Images::EVAL_ERROR)
200 0 0 if ($page_hr->{'model'} ne "page")
207 0 0 unless ($self->{'_opts'}{'q'})
211 0 0 unless (-r $pid . ".jpg")
220 1 0 if ($images == 0)
222 1 0 unless ($self->{'_opts'}{'q'})
227 1 0 unless (-r $output_file)
257 0 0 if (ref $page_hr->{'title'} eq 'ARRAY') { }
0 0 elsif (ref $page_hr->{'title'} eq '') { }
272 0 1 if ($self->{'_opts'}{'v'})