Branch Coverage

blib/lib/EBook/Ishmael/EBook/Epub.pm
Criterion Covered Total %
branch 51 92 55.4


line true false branch
35 12 103 if $file =~ /\.zip$/u
63 0 10 unless (defined $rf)
93 10 0 if (defined $vernode)
109 0 10 unless (defined $meta)
113 0 10 unless (defined $manif)
117 0 10 unless (defined $spine)
128 10 60 if ($name eq 'contributor') { }
10 50 elsif ($name eq 'creator') { }
10 40 elsif ($name eq 'date') { }
0 40 elsif ($name eq 'description') { }
20 20 elsif ($name eq 'identifier') { }
10 10 elsif ($name eq 'language') { }
0 10 elsif ($name eq 'publisher') { }
0 10 elsif ($name eq 'subject') { }
10 0 elsif ($name eq 'title') { }
134 10 0 if (defined $t)
155 0 40 unless my $id = $itemref->getAttribute("idref")
157 0 40 unless my($item) = $xpc->findnodes(qq[./package:item[\@id="$id"]], $manif)
161 0 40 unless (($item->getAttribute("media-type") // "") eq "application/xhtml+xml")
165 0 40 unless my $href = $item->getAttribute("href")
169 0 40 unless -f $href
178 0 80 unless defined $mime
181 70 10 unless defined $format
183 0 10 unless my $href = $item->getAttribute("href")
185 0 10 unless -f $href
193 10 0 if (defined $covmeta)
194 0 10 unless my $covcont = $covmeta->getAttribute("content")
195 0 10 unless my($covitem) = $xpc->findnodes(qq[./package:item[\@id="$covcont"]], $manif)
197 0 10 unless my $covhref = $covitem->getAttribute("href")
198 0 10 unless my $covmime = $covitem->getAttribute("media-type")
199 0 10 unless my $format = mimetype_id($covmime)
201 0 10 unless -f $covpath
237 0 10 unless (defined $self->{'Metadata'}->title)
241 10 0 if (defined $self->{'_version'}) { }
265 0 10 unless (-f $self->{'_container'})
292 0 12 unless my($body) = $xpc->findnodes("/html:html/html:body")
300 0 3 if (defined $out) { }
301 0 0 unless open my $fh, ">", $out
329 0 8 unless my($body) = $xpc->findnodes("/html:html/html:body")
337 0 2 if (defined $out) { }
338 0 0 unless open my $fh, ">", $out
370 0 2 unless $self->has_cover
372 0 2 unless open my $fh, "<", $self->{'_cover'}[0]
395 0 2 if ($n >= $self->image_num)
399 0 2 unless open my $fh, "<", $self->{'_images'}[$n][0]
413 10 0 if -d $self->{'_unzip'}