Branch Coverage

blib/lib/PDF/Builder/Basic/PDF/Pages.pm
Criterion Covered Total %
branch 39 82 47.5


line true false branch
60 0 303 if ref $class
63 0 303 if (ref $pdf eq 'ARRAY')
64 0 0 if scalar @$pdf > 1
68 0 303 if ref $class
72 141 162 if defined $parent
77 162 141 unless (defined $self->{'Parent'})
84 141 162 if defined $parent
148 0 141 if ($self->{'Count'}->realise->val <= $$page_number_ref)
155 9 0 if ($kid->{'Type'}->realise->val eq 'Page') { }
0 0 elsif ($result = $kid->realise->find_page_recursively($page_number_ref)) { }
156 9 0 if $$page_number_ref == 0
190 139 2 unless defined $page_number and $page_number <= $top->{'Count'}->val
193 139 2 if ($page_number == -1) { }
196 0 2 if $page_number < 0
201 9 132 if (defined $previous_page->{'Parent'}) { }
210 139 2 if ($page_number == -1) { }
216 2 0 if $parent->{'Kids'}{' val'}[$page_index] eq $previous_page
218 0 2 if $page_index == $parent_kid_count
239 0 141 if (scalar $parent->{'Kids'}->elements >= $max_kids_per_parent and $parent->{'Parent'} and $page_index < 1) { }
250 0 0 if $grandparent->{'Kids'}{' val'}[$new_parent_index] eq $self
253 0 0 if $new_parent_index > $grandparent_kid_count
259 139 2 if ($page_index < 0) { }
316 0 0 if ($kid->{'Type'}->val eq 'Pages') { }
335 186 330 if (defined $self->{$key}) { }
158 172 elsif (defined $self->{'Parent'}) { }
336 186 0 if (ref $self->{$key} and $self->{$key}->isa('PDF::Builder::Basic::PDF::Objind')) { }
375 0 0 if $dict and defined $dict->{'Font'} and defined $dict->{'Font'}{$name}
376 0 0 if (defined $self->{'Resources'}) { }
377 0 0 $dict ? :
386 0 0 if (ref $dict ne 'HASH' and $dict->is_obj($pdf))
389 0 0 if (ref $resource ne 'HASH' and $resource->is_obj($pdf))
411 0 0 if ($inherited)
415 0 0 unless $element->val == $bbox[$i++]
417 0 0 if $i == 4 and not $is_changed
440 141 162 if ($dict and defined $dict->{'ProcSet'})
445 0 141 if scalar @missing == 0
446 0 141 if defined $self->{'Resources'}
449 303 0 unless (defined $self->{'Resources'})
450 141 162 $dict ? :
453 303 0 unless defined $self->{'ProcSet'}
467 0 0 if (defined $parent)