Condition Coverage

blib/lib/PDF/API2.pm
Criterion Covered Total %
condition 49 214 22.9


and 3 conditions

line !l l&&!r l&&r condition
238 1 0 0 $self->{'partial_save'} and not $file
571 0 0 1 $month >= 1 and $month <= 12
574 0 0 1 $day >= 1 and $day <= 31
586 0 1 0 $od eq "Z" and defined $oh
637 1 166 0 defined $value and not length $value
1266 5 0 0 $rotate = $page->find_prop("Rotate") and not $page->{' opened'}
1269 0 0 0 $rotate != 0 and not $self->default("nounrotate")
1301 2 0 3 defined $page->{'Contents'} and not $page->{' opened'}
1375 0 0 1 ref $s_pdf and $s_pdf->isa("PDF::API2")
1421 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'}
1479 0 0 0 $AcroForm and $t_a->{'Subtype'}->val eq "Widget"
1531 0 0 4 ref $s_pdf and $s_pdf->isa("PDF::API2")
1768 0 0 8 $options{'style'} and $options{'style'} =~ /^([rad])/i
2291 0 0 3 $bytes_read and $bytes_read == 8

or 2 conditions

line l !l condition
142 164 0 eval { do { $VERSION } } || 'Development Version'
191 16 0 $self->{'pdf'}{' version'} ||= "1.3"
689 1 0 $opt{$k} || 'NONE'
920 169 0 shift() // "single_page"
994 169 0 shift() // "none"
1158 0 16 $pdf->{' apipagecount'} ||= 0
1200 2 140 shift() || 0
1245 6 0 shift() || 0
1371 1 0 $s_idx ||= 0
1372 0 1 $t_idx ||= 0
1399 0 1 $self->{'apiimportcache'} || {}
1400 0 1 $self->{'apiimportcache'}{$s_pdf} || {}
1529 4 0 $s_idx ||= 0
1546 1 3 $self->{'apiimportcache'} ||= {}
1547 1 3 $self->{'apiimportcache'}{$s_pdf} ||= {}
1722 8 0 shift() // {}
1741 6 2 $options{'style'} //= "D"
1775 1 0 $options{'prefix'} // ""
1779 1 0 $options{'start'} // ""
1982 0 0 $options{'embed'} //= 1
2147 0 0 $opts{'embed'} //= 1
2149 0 0 $opts{'embed'} //= 1
2238 0 3 $options{'format'} // ""
2465 0 0 $options{'bar_width'} //= "1.8"
2466 0 0 $options{'bar_extend'} //= 0
2477 0 0 $options{'bar_width'} //= 1
2478 0 0 $options{'bar_extend'} //= 0
2489 0 0 $options{'bar_width'} //= 1
2490 0 0 $options{'bar_height'} //= 40
2491 0 0 $options{'bar_extend'} //= 0
2498 0 0 $options{'bar_width'} //= 1
2499 0 0 $options{'bar_height'} //= "64.8"
2509 0 0 $options{'bar_width'} //= 1
2518 0 0 $options{'font_size'} //= 10
2853 0 0 $root->{'Names'}{$cat}{'-vals'} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
110 164 0 0 $self->{'pages'}{'Resources'} ||= PDFDict()
119 0 0 27 $options{'compress'} //= delete $options{'-compress'}
131 0 0 0 $options{'file'} //= $options{'-file'}
206 0 0 2 $options{'compress'} //= delete $options{'-compress'}
639 1 0 166 $field eq "CreationDate" or $field eq "ModDate"
699 0 0 3 unpack("n", $opt{$k}) == 65534 or unpack("n", $opt{$k}) == 65279
1760 0 8 0 $self->{'catalog'}{'PageLabels'} //= PDFDict()
1761 0 8 0 $self->{'catalog'}{'PageLabels'}{'Nums'} //= PDFArray()
1977 0 0 0 $format //= $name =~ /\.[ot]tf$/i ? "truetype" : ($name =~ /\.pf[ab]$/i ? "type1" : ($name =~ /\.bdf$/i ? "bitmap" : ""))
2244 0 3 0 $format ||= _detect_image_format($file)
2247 0 0 0 $format ||= $file =~ /\.jpe?g$/i ? "jpeg" : ($file =~ /\.png$/i ? "png" : ($file =~ /\.gif$/i ? "gif" : ($file =~ /\.tiff?$/i ? "tiff" : ($file =~ /\.p[bgp]m$/i ? "pnm" : ""))))
2324 0 2 1 $opts{'-compress'} //= $self->{'forcecompress'}
2464 0 0 0 $format eq "code128" or $format eq "ean128"
0 0 0 $format eq "code128" or $format eq "ean128" or $format eq "code39"
2467 0 0 0 $options{'quiet_zone'} //= 10 * $options{'bar_width'}
2469 0 0 0 $options{'font_size'} //= 9 * $options{'bar_width'}
2474 0 0 0 $options{'bar_height'} //= &max(18, $length * "0.15")
2479 0 0 0 $options{'quiet_zone'} //= 11 * $options{'bar_width'}
2481 0 0 0 $options{'font_size'} //= 10 * $options{'bar_width'}
2486 0 0 0 $options{'bar_height'} //= &max(36, $length * "0.15")
2492 0 0 0 $options{'quiet_zone'} //= 10 * $options{'bar_width'}
2494 0 0 0 $options{'font_size'} //= 9 * $options{'bar_width'}
2500 0 0 0 $options{'quiet_zone'} //= 11 * $options{'bar_width'}
2502 0 0 0 $options{'bar_extend'} //= 5 * $options{'bar_width'}
2505 0 0 0 $options{'font_size'} //= 10 * $options{'bar_width'}
2510 0 0 0 $options{'bar_height'} //= $options{'bar_width'}
2511 0 0 0 $options{'quiet_zone'} //= 4 * $options{'bar_width'}
2520 0 0 0 $options{'bar_extend'} or $options{'font_size'}
2521 0 0 0 $options{'font'} //= $self->font("Helvetica")
2851 0 0 0 $root->{'Names'} ||= PDFDict()
2852 0 0 0 $root->{'Names'}{$cat} ||= PDFDict()
2854 0 0 0 $root->{'Names'}{$cat}{'Limits'} ||= PDFArray()
2855 0 0 0 $root->{'Names'}{$cat}{'Names'} ||= PDFArray()