Branch Coverage

blib/lib/PDF/API2/Page.pm
Criterion Covered Total %
branch 49 96 51.0


line true false branch
82 0 142 if ref $class
146 1 0 if (@_)
295 0 6 if (ref $value eq "ARRAY")
296 0 0 if (@$value == 2) { }
0 0 elsif (@$value == 4) { }
306 2 4 if ($value =~ /^([0-9.]+)\s*x\s*([0-9.]+)$/)
308 2 0 if (&looks_like_number($w) and &looks_like_number($h))
314 4 0 if ($$page_sizes{lc $value})
318 0 0 if (ref $value) { }
330 6 0 @_ ? :
346 22 8 unless exists $boxes{$box}
354 2 6 if ($box ne 'media' and not ref $value and &looks_like_number($value)) { }
355 2 0 $box eq 'trim' ? :
0 2 $box eq 'bleed' ? :
0 2 $box eq 'crop' ? :
358 0 2 if $parent eq "trim" and not $boxes{'trim'}
359 2 0 if $parent eq "bleed" and not $boxes{'bleed'}
360 0 2 if $parent eq "bleed" and not $boxes{'bleed'}
361 0 2 unless ($boxes{$parent})
390 46 46 unless (scalar @_)
392 0 46 unless ($box)
395 0 0 if $type eq "MediaBox"
398 0 0 if $type eq "CropBox"
412 0 38 unless @_
425 0 1 unless @_
438 0 1 unless @_
451 0 1 unless @_
464 0 1 unless @_
500 0 0 unless ($degrees == 0 or $degrees == 90 or $degrees == -90 or $degrees == 180 or $degrees == -180 or $degrees == 270 or $degrees == -270)
539 0 128 if (ref($self->{'Contents'}) =~ /Objind$/)
542 0 128 unless (ref($self->{'Contents'}) =~ /Array$/)
550 0 122 if (defined $dir and $dir > 0) { }
556 122 0 unless $obj->is_obj($self->{' apipdf'})
599 10 94 if $options{'compress'}
601 0 104 if ($options{'prepend'}) { }
623 0 18 if (@_ == 1) { }
634 5 13 if $options{'compress'}
636 0 18 if ($options{'prepend'}) { }
684 1 5 exists $self->{'Annots'} ? :
701 1 5 if ($self->{'Annots'}->is_obj($self->{' apipdf'}))
714 0 29 if ref($dict) =~ /Objind$/
717 0 29 if ref($dict->{$type}) =~ /Objind$/
719 29 0 if (defined $obj) { }
723 0 29 if ($force) { }
730 0 29 if $dict->is_obj($self->{' apipdf'})
731 0 29 if $dict->{$type}->is_obj($self->{' apipdf'})
732 29 0 if $obj->is_obj($self->{' apipdf'})
743 0 0 if (defined $self->{'Contents'})