Branch Coverage

blib/lib/PDF/Builder/Page.pm
Criterion Covered Total %
branch 63 146 43.1


line true false branch
70 0 194 if ref $class
80 0 194 if (defined $self->{'Parent'}{'UserUnit'}) { }
85 0 0 if ($UU != 1)
152 0 0 if (float($value) <= 0)
174 29 98 if (scalar @corners and $corners[0] =~ /[a-z]/i)
176 78 49 if (scalar @corners == 0) { }
0 49 elsif (scalar @corners == 3) { }
180 53 25 if (defined $self->{$box}) { }
184 17 8 if (defined $pdf->{'pages'}{$box}) { }
189 4 2 if ($box eq "ArtBox" or $box eq "TrimBox" or $box eq "BleedBox")
192 8 0 if ($box eq "CropBox" and not defined $pdf->{'pages'}{'CropBox'})
195 0 8 if ($box ne "CropBox" and $box ne "MediaBox")
207 0 0 if (defined $opts{'-orient'} and not defined $opts{'orient'})
210 0 0 if (defined $opts{'orient'})
211 0 0 if ($opts{'orient'} =~ /^l/i)
224 29 20 if ($isName)
226 0 29 if ($UU != 1)
450 0 0 if ($degrees % 90)
494 1 0 if (@_) { }
650 0 6 if (ref $value eq "ARRAY")
651 0 0 if (@$value == 2) { }
0 0 elsif (@$value == 4) { }
660 2 4 if ($value =~ /^([0-9.]+)\s*x\s*([0-9.]+)$/)
662 2 0 if (&looks_like_number($w) and &looks_like_number($h))
670 4 0 if ($page_sizes{lc $value})
674 0 0 if (ref $value) { }
685 0 6 if (@_ == 0) { }
0 6 elsif (@_ == 1) { }
704 22 8 unless exists $boxes{$box}
712 2 6 if ($box ne 'media' and not ref $value and &looks_like_number($value)) { }
713 2 0 $box eq 'trim' ? :
0 2 $box eq 'bleed' ? :
0 2 $box eq 'crop' ? :
716 0 2 if $parent eq "trim" and not $boxes{'trim'}
717 2 0 if $parent eq "bleed" and not $boxes{'bleed'}
718 0 2 if $parent eq "bleed" and not $boxes{'bleed'}
719 0 2 unless ($boxes{$parent})
746 4 4 unless (scalar @_)
748 0 4 unless ($box)
751 0 0 if $type eq "MediaBox"
754 0 0 if $type eq "CropBox"
769 0 161 if (ref($self->{'Contents'}) =~ /Objind$/)
772 0 161 unless (ref($self->{'Contents'}) =~ /Array$/)
781 0 154 if (defined $dir and $dir > 0) { }
786 154 0 unless $obj->is_obj($self->{' apipdf'})
905 134 0 if (scalar @params == 0) { }
0 0 elsif (scalar @params == 1) { }
0 0 elsif (scalar(@params) % 2) { }
917 0 0 if (defined $hash{'-prepend'} and not defined $hash{'prepend'})
918 0 0 if (defined $hash{'-compress'} and not defined $hash{'compress'})
920 0 0 if (defined $hash{'prepend'})
921 0 0 if (defined $hash{'compress'})
923 0 134 if ($prepend)
928 0 134 if $compress
988 20 0 if (scalar @params == 0) { }
0 0 elsif (scalar @params == 1) { }
0 0 elsif (scalar(@params) % 2) { }
1000 0 0 if (defined $hash{'-prepend'} and not defined $hash{'prepend'})
1001 0 0 if (defined $hash{'-compress'} and not defined $hash{'compress'})
1003 0 0 if (defined $hash{'prepend'})
1004 0 0 if (defined $hash{'compress'})
1006 0 20 if ($prepend)
1011 0 20 if $compress
1051 1 5 exists $self->{'Annots'} ? :
1067 1 5 if ($self->{'Annots'}->is_obj($self->{' apipdf'}))
1098 0 32 if ref($dict) =~ /Objind$/
1101 0 32 if ref($dict->{$type}) =~ /Objind$/
1103 30 2 if (defined $obj) { }
1106 0 30 if ($force) { }
1112 0 30 if $dict->is_obj($self->{' apipdf'})
1113 0 30 if $dict->{$type}->is_obj($self->{' apipdf'})
1114 28 2 if $obj->is_obj($self->{' apipdf'})
1125 0 0 if (defined $self->{'Contents'})