Condition Coverage

blib/lib/CAM/PDF.pm
Criterion Covered Total %
condition 91 315 28.8


and 3 conditions

line !l l&&!r l&&r condition
304 0 4 13 $ver and $ver > $pdfversion
350 0 2 7 $ver and $ver > $pdfversion
578 0 24 0 $trailer and exists $$trailer{'XRefStm'}
591 0 26 2 $trailer and exists $$trailer{'Prev'}
720 0 4 0 $content[-1] and not $content[-1] =~ /endobj/msx
832 0 24 0 $trailerpos > 0 and $trailerpos < $startxref
883 0 24 0 $sxrefpos > 0 and $sxrefpos < $trailerpos
1411 1709 2 33 $string =~ / (\\+) \z/msx and 1 == length($1) % 2
1807 0 0 0 $dict and $$dict{'Type'}
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font'
1838 0 0 0 $dict and $$dict{'Type'}
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font'
1869 0 0 0 $dict and $$dict{'Type'}
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font'
1900 0 0 0 $dict and $$dict{'Type'}
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font'
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font' and $$dict{'BaseFont'}
0 0 0 $dict and $$dict{'Type'} and $$dict{'Type'}{'value'} eq 'Font' and $$dict{'BaseFont'} and $$dict{'BaseFont'}{'value'} eq $fontname
1954 0 0 164 $fontdict and $$fontdict{'Type'}
0 0 164 $fontdict and $$fontdict{'Type'} and $$fontdict{'Type'}{'value'} eq 'Font'
2174 0 0 0 defined $_[0] and ref $_[0]
2277 0 0 3637 $char >= $firstc and $char <= $lastc
2287 0 0 0 $fd && exists $$fd{'MissingWidth'}
2527 0 30 0 $page and exists $$page{'Contents'}
2755 0 0 0 defined $parentname and $parentname ne ''
2987 0 0 0 $name and $$objnode{'value'}{'type'} eq 'dictionary'
3012 0 0 0 $$objnode{'value'}{'type'} eq 'dictionary' and exists $$objnode{'value'}{'value'}{'Name'}
3098 4 0 0 $$page{'Contents'} and $$page{'Contents'}{'type'} eq 'reference'
3320 8 0 62 $node and $$nodedict{'Type'}{'value'} eq 'Pages'
3471 2 0 0 $dest and ref $dest
2 0 0 $dest and ref $dest and ref $dest eq 'ARRAY'
3474 0 0 0 $ref and $$ref{'type'} eq 'reference'
0 0 0 $ref and $$ref{'type'} eq 'reference' and $$objnums{$$ref{'value'}}
3526 0 0 0 $ref and $$ref{'type'} eq 'reference'
0 0 0 $ref and $$ref{'type'} eq 'reference' and $$objnums{$$ref{'value'}}
4092 20 285 4 $otherdoc and $$otherdoc{'maxobj'} >= $objnum
4240 0 521 335 @list and $list[0] == $i
4383 0 0 0 $$propdict{'FT'} and $self->getValue($$propdict{'FT'}) eq 'Tx'
4502 0 0 0 $fontmetrics and not $fontsize
4511 0 0 0 $w and $w > $stringwidth
4527 0 0 0 exists $$opts{'max_autoscale_fontsize'} and $fontsize > $$opts{'max_autoscale_fontsize'}
4530 0 0 0 exists $$opts{'min_autoscale_fontsize'} and $fontsize < $$opts{'min_autoscale_fontsize'}
4572 0 0 0 $flags{'Justify'} ne 'left' and $fontmetrics
4724 0 0 0 $$annot{'Subtype'} and $$annot{'Subtype'}{'value'} eq 'Widget'
0 0 0 $$annot{'Subtype'} and $$annot{'Subtype'}{'value'} eq 'Widget' and $$annot{'FT'}
0 0 0 $$annot{'Subtype'} and $$annot{'Subtype'}{'value'} eq 'Widget' and $$annot{'FT'} and $$annot{'FT'}{'value'} eq 'Tx'
0 0 0 $$annot{'Subtype'} and $$annot{'Subtype'}{'value'} eq 'Widget' and $$annot{'FT'} and $$annot{'FT'}{'value'} eq 'Tx' and $$annot{'AP'}
4859 0 2 6 $objnode and $$objnode{'value'}{'type'} eq 'dictionary'
4953 27 0 1 exists $$trailer{'Type'} and $$trailer{'Type'}{'value'} eq 'XRef'
5362 0 0 0 2 == scalar keys %{$val;} and exists $$val{'Length'} || exists $$val{'L'}
5409 267 432 201 $$val{'type'} eq 'dictionary' and exists $$val{'value'}{'StreamData'}
5490 26464 127 729 $type eq 'reference' && $deref && !exists($$traversed{$val})
5759 0 0 0 $pa <= $pb && $pa <= $pc
5837 0 4 0 defined $l and $$l{'type'} eq 'reference'
6057 10 0 24 defined $new and $new ne $key
6110 0 0 0 $res and $$objnode{'objnum'}
6117 0 0 0 $$objnode{'value'} =~ s/ $key /$$changelist{$key}/gmsx and $$objnode{'objnum'}
6168 1 2 18 $_ >= $min and $_ <= $max
6182 9 2 2 $aa < $min and $bb < $min
6183 9 0 2 $aa > $max and $bb > $max

or 2 conditions

line l !l condition
1226 3 347 shift() || '<<\\s*'
1227 3 347 shift() || '>>\\s*'
3551 0 0 [values %{$node;}]->[0]{'objnum'} || die()
3565 0 0 $$pairs[$i]{'value'} || die('No name in Name tree')
3881 0 4 shift() || 0
4492 0 0 $self->getValue($$propdict{'Q'}) || 0
4516 0 0 $lines ||= 1
5281 0 0 $objnum || ''
5464 297 341 shift() || {}
5563 0 46 shift() || 0
5981 0 297 shift() || 0
6233 0 0 $pos ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
405 14 0 12 $$self{'crypt'} or $$self{'options'}{'fault_tolerant'}
533 0 0 26 not $root or ref $root ne 'HASH'
546 0 0 26 not $pages or ref $pages ne 'HASH'
554 0 0 26 not $$self{'PageCount'} or $$self{'PageCount'} < 1
748 0 0 4 not exists $$trailer{'Type'} or 'XRef' ne $$trailer{'Type'}{'value'}
934 0 0 12 not $pagenum or $pagenum eq 'All'
1150 3 66 0 shift() || qr/ stream[ \t]*\r?\n /msx
1151 3 66 0 shift() || qr/ \s*endstream\s* /msx
1160 67 0 2 $$dict{'Length'} || $$dict{'L'}
1642 1638 1638 3835 $$objnode{'type'} eq 'reference' or $$objnode{'type'} eq 'object'
1738 0 0 249 not defined $endpos or $endpos < $pos
2260 0 0 795 not defined $string or $string eq ''
2352 0 0 96 $pagenum < 1 or $pagenum > $$self{'PageCount'}
2775 0 0 0 not ref $kid or ref $kid ne 'CAM::PDF::Node'
0 0 0 not ref $kid or ref $kid ne 'CAM::PDF::Node' or $$kid{'type'} ne 'reference'
2897 0 0 0 $$dict{'DR'} ||= 'CAM::PDF::Node'->new('dictionary', {})
3567 0 0 0 $$limits[0]{'value'} eq $name or $$limits[1]{'value'} eq $name
3609 0 0 0 not $limits or @{$limits;} != 2
3988 0 0 0 $pos == 0 or substr($c, $pos - 1, 1) =~ / \W /msx
4574 0 0 0 $stringwidth || $self->getStringWidth($fontmetrics, $text)
5027 0 0 0 $o{$_} || $_ + $n
5094 16 0 1728 $i == $#blockkeys or $key + 1 < $blockkeys[$i + 1]
5362 0 0 0 exists $$val{'Length'} || exists $$val{'L'}
5414 201 0 0 $$val{'value'}{'Length'} || $$val{'value'}{'L'}
5585 4 0 37 $$dict{'DecodeParms'} || $$dict{'DP'}
5609 0 41 0 $filterabbrevs{$filtername} || $filtername
5681 0 0 4 not $d or ref $d ne 'HASH'
5685 4 0 0 $filter eq 'FlateDecode' or $filter eq 'Fl'
4 0 0 $filter eq 'FlateDecode' or $filter eq 'Fl' or $filter eq 'LZWDecode'
0 0 0 $filter eq 'FlateDecode' or $filter eq 'Fl' or $filter eq 'LZWDecode' or $filter eq 'LZW'
5814 0 0 4 $filtername eq 'LZWDecode' or $filtername eq 'LZW'
5830 4 0 0 $$dict{'Length'} || $$dict{'L'}
5835 0 4 0 not defined $oldlength or $length != $oldlength
5837 0 4 0 not defined $l or $$l{'type'} eq 'number'
5860 0 0 4 $$dict{'Filter'} || $$dict{'F'}
5885 0 0 4 $$dict{'DecodeParms'} or $$dict{'DP'}
6235 0 0 0 not defined $s or $s eq ''