Branch Coverage

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


line true false branch
34 12 103 if $file =~ /\.zip$/u
62 0 10 unless (defined $rf)
92 10 0 if (defined $vernode)
108 0 10 unless (defined $meta)
112 0 10 unless (defined $manif)
116 0 10 unless (defined $spine)
127 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') { }
133 0 10 if (defined $t)
154 0 40 unless my $id = $itemref->getAttribute("idref")
156 0 40 unless my($item) = $xpc->findnodes(qq[./package:item[\@id="$id"]], $manif)
160 0 40 unless (($item->getAttribute("media-type") // "") eq "application/xhtml+xml")
164 0 40 unless my $href = $item->getAttribute("href")
168 0 40 unless -f $href
177 0 80 unless defined $mime
180 70 10 unless defined $format
182 0 10 unless my $href = $item->getAttribute("href")
184 0 10 unless -f $href
192 10 0 if (defined $covmeta)
193 0 10 unless my $covcont = $covmeta->getAttribute("content")
194 0 10 unless my($covitem) = $xpc->findnodes(qq[./package:item[\@id="$covcont"]], $manif)
196 0 10 unless my $covhref = $covitem->getAttribute("href")
197 0 10 unless my $covmime = $covitem->getAttribute("media-type")
198 0 10 unless my $format = mimetype_id($covmime)
200 0 10 unless -f $covpath
236 0 10 unless (defined $self->{'Metadata'}->title)
240 10 0 if (defined $self->{'_version'}) { }
264 0 10 unless (-f $self->{'_container'})
291 0 12 unless my($body) = $xpc->findnodes("/html:html/html:body")
298 0 3 if (defined $out) { }
299 0 0 unless open my $fh, ">", $out
327 0 8 unless my($body) = $xpc->findnodes("/html:html/html:body")
334 0 2 if (defined $out) { }
335 0 0 unless open my $fh, ">", $out
367 0 2 unless $self->has_cover
369 0 2 unless open my $fh, "<", $self->{'_cover'}[0]
392 0 2 if ($n >= $self->image_num)
396 0 2 unless open my $fh, "<", $self->{'_images'}[$n][0]
410 10 0 if -d $self->{'_unzip'}