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})
388 46 46 unless (scalar @_)
390 0 46 unless ($box)
393 0 0 if $type eq "MediaBox"
396 0 0 if $type eq "CropBox"
410 0 38 unless @_
423 0 1 unless @_
436 0 1 unless @_
449 0 1 unless @_
462 0 1 unless @_
498 0 0 unless ($degrees == 0 or $degrees == 90 or $degrees == -90 or $degrees == 180 or $degrees == -180 or $degrees == 270 or $degrees == -270)
537 0 128 if (ref($self->{'Contents'}) =~ /Objind$/)
540 0 128 unless (ref($self->{'Contents'}) =~ /Array$/)
548 0 122 if (defined $dir and $dir > 0) { }
554 122 0 unless $obj->is_obj($self->{' apipdf'})
597 10 94 if $options{'compress'}
599 0 104 if ($options{'prepend'}) { }
621 0 18 if (@_ == 1) { }
632 5 13 if $options{'compress'}
634 0 18 if ($options{'prepend'}) { }
682 1 5 exists $self->{'Annots'} ? :
699 1 5 if ($self->{'Annots'}->is_obj($self->{' apipdf'}))
712 0 29 if ref($dict) =~ /Objind$/
715 0 29 if ref($dict->{$type}) =~ /Objind$/
717 29 0 if (defined $obj) { }
721 0 29 if ($force) { }
728 0 29 if $dict->is_obj($self->{' apipdf'})
729 0 29 if $dict->{$type}->is_obj($self->{' apipdf'})
730 29 0 if $obj->is_obj($self->{' apipdf'})
741 0 0 if (defined $self->{'Contents'})