Condition Coverage

blib/lib/PDF/Builder.pm
Criterion Covered Total %
condition 130 384 33.8


and 3 conditions

line !l l&&!r l&&r condition
314 118 0 99 defined $opts{'-compress'} and not defined $opts{'compress'}
315 217 0 0 defined $opts{'-diaglevel'} and not defined $opts{'diaglevel'}
316 216 0 1 defined $opts{'-outver'} and not defined $opts{'outver'}
317 217 0 0 defined $opts{'-msgver'} and not defined $opts{'msgver'}
318 217 0 0 defined $opts{'-file'} and not defined $opts{'file'}
592 18 0 0 defined $opts{'-diags'} and not defined $opts{'diags'}
593 18 0 0 defined $opts{'-compress'} and not defined $opts{'compress'}
594 18 0 0 defined $opts{'-diaglevel'} and not defined $opts{'diaglevel'}
1111 0 0 1 $month >= 1 and $month <= 12
1114 0 0 1 $day >= 1 and $day <= 31
1126 0 1 0 $od eq "Z" and defined $oh
1172 1 2 0 defined $value and not length $value
1747 222 0 0 defined $opts{'-fullscreen'} and not defined $opts{'fullscreen'}
1748 222 0 0 defined $opts{'-thumbs'} and not defined $opts{'thumbs'}
1749 222 0 0 defined $opts{'-outlines'} and not defined $opts{'outlines'}
1751 222 0 0 defined $opts{'-singlepage'} and not defined $opts{'singlepage'}
1752 222 0 0 defined $opts{'-onecolumn'} and not defined $opts{'onecolumn'}
1753 222 0 0 defined $opts{'-twocolumnleft'} and not defined $opts{'twocolumnleft'}
1754 222 0 0 defined $opts{'-twocolumnright'} and not defined $opts{'twocolumnright'}
1756 222 0 0 defined $opts{'-hidetoolbar'} and not defined $opts{'hidetoolbar'}
1757 222 0 0 defined $opts{'-hidemenubar'} and not defined $opts{'hidemenubar'}
1758 222 0 0 defined $opts{'-hidewindowui'} and not defined $opts{'hidewindowui'}
1759 222 0 0 defined $opts{'-fitwindow'} and not defined $opts{'fitwindow'}
1760 222 0 0 defined $opts{'-centerwindow'} and not defined $opts{'centerwindow'}
1761 222 0 0 defined $opts{'-displaytitle'} and not defined $opts{'displaytitle'}
1762 222 0 0 defined $opts{'-righttoleft'} and not defined $opts{'righttoleft'}
1763 222 0 0 defined $opts{'-afterfullscreenthumbs'} and not defined $opts{'afterfullscreenthumbs'}
1764 222 0 0 defined $opts{'-afterfullscreenoutlines'} and not defined $opts{'afterfullscreenoutlines'}
1765 222 0 0 defined $opts{'-printscalingnone'} and not defined $opts{'printscalingnone'}
1766 221 0 1 defined $opts{'-simplex'} and not defined $opts{'simplex'}
1767 221 0 1 defined $opts{'-duplexfliplongedge'} and not defined $opts{'duplexfliplongedge'}
1768 221 0 1 defined $opts{'-duplexflipshortedge'} and not defined $opts{'duplexflipshortedge'}
1770 220 0 2 defined $opts{'-firstpage'} and not defined $opts{'firstpage'}
1771 222 0 0 defined $opts{'-fit'} and not defined $opts{'fit'}
1772 222 0 0 defined $opts{'-fith'} and not defined $opts{'fith'}
1773 222 0 0 defined $opts{'-fitb'} and not defined $opts{'fitb'}
1774 222 0 0 defined $opts{'-fitbh'} and not defined $opts{'fitbh'}
1775 222 0 0 defined $opts{'-fitv'} and not defined $opts{'fitv'}
1776 222 0 0 defined $opts{'-fitbv'} and not defined $opts{'fitbv'}
1777 222 0 0 defined $opts{'-fitr'} and not defined $opts{'fitr'}
1778 222 0 0 defined $opts{'-xyz'} and not defined $opts{'xyz'}
1860 0 0 2 defined $args{'-fit'} and not defined $args{'fit'}
1861 2 0 0 defined $args{'-fith'} and not defined $args{'fith'}
1862 2 0 0 defined $args{'-fitb'} and not defined $args{'fitb'}
1863 2 0 0 defined $args{'-fitbh'} and not defined $args{'fitbh'}
1864 2 0 0 defined $args{'-fitv'} and not defined $args{'fitv'}
1865 2 0 0 defined $args{'-fitbv'} and not defined $args{'fitbv'}
1866 2 0 0 defined $args{'-fitr'} and not defined $args{'fitr'}
1867 2 0 0 defined $args{'-xyz'} and not defined $args{'xyz'}
2036 6 0 0 $rotate = $page->find_prop("Rotate") and not $page->{' opened'}
2039 0 0 0 $rotate != 0 and not $self->default("nounrotate")
2066 2 0 4 defined $page->{'Contents'} and not $page->{' opened'}
2151 0 0 1 ref $s_pdf and $s_pdf->isa("PDF::Builder")
2194 1 0 0 exists $s_page->{'Annots'} and $s_page->{'Annots'}
0 0 0 exists $s_page->{'Annots'} and $s_page->{'Annots'} and $self->{'copyannots'}
2252 0 0 0 $AcroForm and $t_a->{'Subtype'}->val eq "Widget"
2306 0 0 4 ref $s_pdf and $s_pdf->isa("PDF::Builder")
2588 8 0 0 defined $opts->{'-style'} and not defined $opts->{'style'}
2589 8 0 0 defined $opts->{'-prefix'} and not defined $opts->{'prefix'}
2590 8 0 0 defined $opts->{'-start'} and not defined $opts->{'start'}
2664 0 16 218 scalar @corners and $corners[0] =~ /[a-z]/i
2670 0 0 0 defined $opts{'-orient'} and not defined $opts{'orient'}
2687 16 218 0 $isName and $UU != 1
2884 52 0 0 defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'}
2906 0 0 0 defined $opts{'-afmfile'} and not defined $opts{'afmfile'}
2907 0 0 0 defined $opts{'-pfmfile'} and not defined $opts{'pfmfile'}
2908 0 0 0 defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'}
2934 0 0 0 defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'}
2935 0 0 0 defined $opts{'-noembed'} and not defined $opts{'noembed'}
3000 1 0 0 defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'}
3084 0 0 0 defined $opts{'-encode'} and not defined $opts{'encode'}
3085 0 0 0 defined $opts{'-kerning'} and not defined $opts{'kerning'}
3086 0 0 0 defined $opts{'-dokern'} and not defined $opts{'dokern'}
3087 0 0 0 defined $opts{'-embed'} and not defined $opts{'embed'}
3088 0 0 0 defined $opts{'-afmfile'} and not defined $opts{'afmfile'}
3089 0 0 0 defined $opts{'-pfmfile'} and not defined $opts{'pfmfile'}
3228 0 0 0 defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'}
3398 0 0 3 $bytes_read and $bytes_read == 8
3450 0 0 4 defined $opts{'-nouseGT'} and not defined $opts{'nouseGT'}
3451 3 0 1 defined $opts{'-silent'} and not defined $opts{'silent'}
3457 0 0 0 defined $opts{'nouseGT'} and $opts{'nouseGT'} == 1
3472 0 2 1 $rc == 0 and $MSG_COUNT[0]++ == 0
3568 5 0 0 defined $opts{'-nouseIPL'} and not defined $opts{'nouseIPL'}
3569 5 0 0 defined $opts{'-silent'} and not defined $opts{'silent'}
3575 0 0 0 defined $opts{'nouseIPL'} and $opts{'nouseIPL'} == 1
3590 0 3 1 $rc == 0 and $MSG_COUNT[1]++ == 0
4170 49 75 9 defined $objList{$objKey} and $update > 0
4384 26 97 8 $objList{$thisObj}[$idx_parent] == -1 and $objList{$thisObj}[$idx_refcount] == 0

or 2 conditions

line l !l condition
385 217 0 eval { do { $VERSION } } || '(Development Version)'
647 18 0 $self->{'pdf'}{' version'} ||= "1.4"
790 0 18 $pdf->{' apipagecount'} ||= 0
1236 218 0 $opt{$k} || 'NONE'
1621 0 0 shift() // "single_page"
1694 0 0 shift() // "none"
1906 0 0 $pdf->{' apipagecount'} ||= 0
1960 2 192 shift() || 0
2017 7 0 shift() || 0
2147 1 0 $s_idx ||= 0
2148 0 1 $t_idx ||= 0
2172 0 1 $self->{'apiimportcache'} || {}
2173 0 1 $self->{'apiimportcache'}{$s_pdf} || {}
2304 4 0 $s_idx ||= 0
2321 1 3 $self->{'apiimportcache'} ||= {}
2322 1 3 $self->{'apiimportcache'}{$s_pdf} ||= {}
3094 0 0 $opts{'dokern'} //= 1
3107 0 0 $opts{'embed'} //= 1
3340 0 3 $opts{'format'} // ""
3901 0 0 $samples ||= 2
4072 0 0 $root->{'Names'}{$cat}{'-vals'} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
331 217 0 0 $self->{'pages'}{'Resources'} ||= PDFDict()
353 0 0 0 $diaglevel < 0 or $diaglevel > 5
371 1 0 0 $opts{'msgver'} == 0 or $opts{'msgver'} == 1
605 0 0 18 $diaglevel < 0 or $diaglevel > 5
669 0 0 0 $self->{'diaglevel'} < 0 or $self->{'diaglevel'} > 5
1174 1 0 2 $field eq "CreationDate" or $field eq "ModDate"
1246 0 0 220 unpack("n", $opt{$k}) == 65534 or unpack("n", $opt{$k}) == 65279
1805 5 217 0 $self->{'catalog'}{'ViewerPreferences'} ||= PDFDict()
2084 4 0 0 $self->{'forcecompress'} eq "flate" or $self->{'forcecompress'} =~ /^[1-9]\d*$/
2379 2 0 1 $self->{'forcecompress'} eq "flate" or $self->{'forcecompress'} =~ /^[1-9]\d*$/
2580 0 8 0 $self->{'catalog'}{'PageLabels'} ||= PDFDict()
2581 0 8 0 $self->{'catalog'}{'PageLabels'}{'Nums'} ||= PDFArray()
2703 2 2 2 $boxname eq "BleedBox" or $boxname eq "TrimBox"
4 2 0 $boxname eq "BleedBox" or $boxname eq "TrimBox" or $boxname eq "ArtBox"
3102 0 0 0 $format //= $name =~ /\.[ot]tf$/i ? "truetype" : ($name =~ /\.pf[ab]$/i ? "type1" : ($name =~ /\.bdf$/i ? "bitmap" : ""))
3346 0 3 0 $format ||= _detect_image_format($file)
3352 0 0 0 $format ||= $file =~ /\.jpe?g$/i ? "jpeg" : ($file =~ /\.png$/i ? "png" : ($file =~ /\.gif$/i ? "gif" : ($file =~ /\.tiff?$/i ? "tiff" : ($file =~ /\.p[bgpn]m$/i ? "pnm" : ""))))
3475 0 0 1 not defined $opts{'silent'} or $opts{'silent'} == 0
3537 0 3 0 $opts{'compress'} //= $self->{'forcecompress'}
3593 0 0 1 not defined $opts{'silent'} or $opts{'silent'} == 0
4070 0 0 0 $root->{'Names'} ||= PDFDict()
4071 0 0 0 $root->{'Names'}{$cat} ||= PDFDict()
4073 0 0 0 $root->{'Names'}{$cat}{'Limits'} ||= PDFArray()
4074 0 0 0 $root->{'Names'}{$cat}{'Names'} ||= PDFArray()
4161 133 0 38 $rawObject =~ /^(.*?)\s?(\d+) (\d+) obj\s(.*)$/s or $rawObject =~ /^(.*?)\s?(\d+) (\d+) obj(.*)$/s
4254 3 0 130 $rawObject =~ m[/Type(\s+)/XRef] or $rawObject =~ m[/Type/XRef]