Branch Coverage

blib/lib/EBook/Ishmael/EBook/Epub.pm
Criterion Covered Total %
branch 49 90 54.4


line true false branch
33 12 103 if $file =~ /\.zip$/u
61 0 10 unless (defined $rf)
91 10 0 if (defined $vernode)
107 0 10 unless (defined $meta)
111 0 10 unless (defined $manif)
115 0 10 unless (defined $spine)
126 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') { }
132 0 10 if (defined $t)
153 0 40 unless my $id = $itemref->getAttribute("idref")
155 0 40 unless my($item) = $xpc->findnodes(qq[./package:item[\@id="$id"]], $manif)
159 0 40 unless (($item->getAttribute("media-type") // "") eq "application/xhtml+xml")
163 0 40 unless my $href = $item->getAttribute("href")
167 0 40 unless -f $href
176 70 10 unless ($item->getAttribute("media-type") // "") =~ m[^image/]u
178 0 10 unless my $href = $item->getAttribute("href")
181 10 0 if -f $href
188 10 0 if (defined $covmeta)
190 0 10 unless my $covcont = $covmeta->getAttribute("content")
192 0 10 unless my($covitem) = $xpc->findnodes(qq[./package:item[\@id="$covcont"]], $manif)
195 0 10 unless my $covhref = $covitem->getAttribute("href")
199 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")
299 0 3 if (defined $out) { }
300 0 0 unless open my $fh, ">", $out
328 0 8 unless my($body) = $xpc->findnodes("/html:html/html:body")
335 0 2 if (defined $out) { }
336 0 0 unless open my $fh, ">", $out
369 0 3 unless defined $self->{'_cover'}
372 0 3 unless open my $rh, "<", $self->{'_cover'}
377 0 3 if (defined $out) { }
378 0 0 unless open my $wh, ">", $out
403 0 2 if ($n >= $self->image_num)
407 0 2 unless open my $fh, "<", $self->{'_images'}[$n]
421 10 0 if -d $self->{'_unzip'}