Branch Coverage

blib/lib/PDF/Builder/Page.pm
Criterion Covered Total %
branch 69 150 46.0


line true false branch
76 0 192 if ref $class
86 0 192 if (defined $self->{'Parent'}{'UserUnit'}) { }
91 0 0 if ($UU != 1)
230 0 5 if (ref $value eq "ARRAY")
231 0 0 if (@$value == 2) { }
0 0 elsif (@$value == 4) { }
240 2 3 if ($value =~ /^([0-9.]+)\s*x\s*([0-9.]+)$/)
242 2 0 if (&looks_like_number($w) and &looks_like_number($h))
250 3 0 if ($page_sizes{lc $value})
254 0 0 if (ref $value) { }
327 0 0 if (float($value) <= 0)
349 29 78 if (scalar @corners and $corners[0] =~ /[a-z]/i)
351 58 49 if (scalar @corners == 0) { }
0 49 elsif (scalar @corners == 3) { }
355 43 15 if (defined $self->{$box}) { }
359 11 4 if (defined $pdf->{'pages'}{$box}) { }
364 2 1 if ($box eq "ArtBox" or $box eq "TrimBox" or $box eq "BleedBox")
367 4 0 if ($box eq "CropBox" and not defined $pdf->{'pages'}{'CropBox'})
370 0 4 if ($box ne "CropBox" and $box ne "MediaBox")
382 0 0 if (defined $opts{'-orient'} and not defined $opts{'orient'})
385 0 0 if (defined $opts{'orient'})
386 0 0 if ($opts{'orient'} =~ /^l/i)
399 29 20 if ($isName)
401 0 29 if ($UU != 1)
688 1 0 if (@_) { }
740 0 5 if (@_ == 0) { }
0 5 elsif (@_ == 1) { }
760 18 7 unless exists $boxes{$box}
768 2 5 if ($box ne 'media' and not ref $value and &looks_like_number($value)) { }
769 2 0 $box eq 'trim' ? :
0 2 $box eq 'bleed' ? :
0 2 $box eq 'crop' ? :
772 0 2 if $parent eq "trim" and not $boxes{'trim'}
773 2 0 if $parent eq "bleed" and not $boxes{'bleed'}
774 0 2 if $parent eq "bleed" and not $boxes{'bleed'}
775 0 2 unless ($boxes{$parent})
801 4 4 unless (scalar @_)
803 0 4 unless ($box)
806 0 0 if $type eq "MediaBox"
809 0 0 if $type eq "CropBox"
824 0 159 if (ref($self->{'Contents'}) =~ /Objind$/)
827 0 159 unless (ref($self->{'Contents'}) =~ /Array$/)
836 0 152 if (defined $dir and $dir > 0) { }
841 152 0 unless $obj->is_obj($self->{' apipdf'})
976 133 0 if (scalar @params == 0) { }
0 0 elsif (scalar @params == 1) { }
0 0 elsif (scalar(@params) % 2) { }
988 0 0 if (defined $hash{'-prepend'} and not defined $hash{'prepend'})
989 0 0 if (defined $hash{'-compress'} and not defined $hash{'compress'})
991 0 0 if (defined $hash{'prepend'})
992 0 0 if (defined $hash{'compress'})
994 0 133 if ($prepend)
995 11 122 if ($self->{' api'}{'forcecompress'} eq "flate" or $self->{' api'}{'forcecompress'} =~ /^[1-9]\d*$/)
999 11 122 if $compress
1067 19 0 if (scalar @params == 0) { }
0 0 elsif (scalar @params == 1) { }
0 0 elsif (scalar(@params) % 2) { }
1079 0 0 if (defined $hash{'-prepend'} and not defined $hash{'prepend'})
1080 0 0 if (defined $hash{'-compress'} and not defined $hash{'compress'})
1082 0 0 if (defined $hash{'prepend'})
1083 0 0 if (defined $hash{'compress'})
1085 0 19 if ($prepend)
1086 5 14 if ($self->{' api'}{'forcecompress'} eq "flate" or $self->{' api'}{'forcecompress'} =~ /^[1-9]\d*$/)
1090 5 14 if $compress
1144 0 0 if ($degrees % 90)
1203 1 5 exists $self->{'Annots'} ? :
1219 1 5 if ($self->{'Annots'}->is_obj($self->{' apipdf'}))
1256 0 32 if ref($dict) =~ /Objind$/
1259 0 32 if ref($dict->{$type}) =~ /Objind$/
1261 30 2 if (defined $obj) { }
1264 0 30 if ($force) { }
1270 0 30 if $dict->is_obj($self->{' apipdf'})
1271 0 30 if $dict->{$type}->is_obj($self->{' apipdf'})
1272 28 2 if $obj->is_obj($self->{' apipdf'})
1283 0 0 if (defined $self->{'Contents'})