| line |
true |
false |
branch |
|
208
|
234 |
0 |
unless ($root)
|
|
260
|
0 |
18 |
if (defined $options{'-diags'} and not defined $options{'diags'})
|
|
262
|
18 |
0 |
unless defined $options{'diags'}
|
|
266
|
18 |
0 |
if (ref $filename) { }
|
|
268
|
18 |
0 |
if ($update)
|
|
274
|
0 |
0 |
unless -f $filename
|
|
275
|
0 |
0 |
unless -r $filename
|
|
277
|
0 |
0 |
if ($update)
|
|
278
|
0 |
0 |
unless -w $filename
|
|
280
|
0 |
0 |
$update ? :
|
|
281
|
0 |
0 |
unless ($fh)
|
|
285
|
0 |
0 |
if ($update)
|
|
294
|
0 |
18 |
unless ($buffer =~ /^\%PDF\-(\d+\.\d+)(.*?)$PDF::Builder::Basic::PDF::File::cr/mo)
|
|
299
|
0 |
18 |
if (defined $2 and length $2 > 0)
|
|
313
|
18 |
18 |
if $buffer =~ /startxref($PDF::Builder::Basic::PDF::File::cr|\s*)\d+($PDF::Builder::Basic::PDF::File::cr|\s*)\%\%eof.*?/i
|
|
315
|
0 |
18 |
unless ($buffer =~ /startxref[^\d]+([0-9]+)($PDF::Builder::Basic::PDF::File::cr|\s*)\%\%eof.*?/i)
|
|
316
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
360
|
5 |
26 |
defined $trailer_version && $trailer_version > $header_version ? :
|
|
364
|
3 |
28 |
if (@_)
|
|
368
|
0 |
3 |
if (defined $opts{'-silent'} and not defined $opts{'silent'})
|
|
371
|
0 |
3 |
if ($version =~ /^\d+$/)
|
|
373
|
0 |
3 |
unless ($version =~ /^[12]\.[0-9]+$/)
|
|
374
|
0 |
0 |
unless defined $opts{'silent'}
|
|
378
|
0 |
3 |
if ($old_version > $version)
|
|
379
|
0 |
0 |
unless defined $opts{'silent'}
|
|
425
|
6 |
33 |
if (@_)
|
|
429
|
0 |
6 |
if (defined $opts{'-silent'} and not defined $opts{'silent'})
|
|
432
|
0 |
6 |
if ($version =~ /^\d+$/)
|
|
434
|
0 |
6 |
unless ($version =~ /^[12]\.[0-9]+$/)
|
|
435
|
0 |
0 |
unless defined $opts{'silent'}
|
|
439
|
0 |
6 |
if ($old_version > $version)
|
|
440
|
0 |
0 |
unless defined $opts{'silent'}
|
|
480
|
12 |
25 |
if ($self->{'Root'}{'Version'})
|
|
485
|
5 |
32 |
if (@_)
|
|
489
|
0 |
5 |
if (defined $opts{'-silent'} and not defined $opts{'silent'})
|
|
492
|
0 |
5 |
if ($version =~ /^\d+$/)
|
|
494
|
0 |
5 |
unless ($version =~ /^[12]\.[0-9]+$/)
|
|
495
|
0 |
0 |
unless defined $opts{'silent'}
|
|
499
|
0 |
5 |
if (defined $old_version and $old_version > $version)
|
|
500
|
0 |
0 |
unless defined $opts{'silent'}
|
|
528
|
1 |
2 |
if $current_version < $min_version
|
|
562
|
0 |
178 |
unless ref $self
|
|
576
|
2527 |
6218 |
if (builtin::blessed($item) and $item->can('release')) { }
|
|
|
1848 |
4370 |
elsif (ref $item eq 'ARRAY') { }
|
|
|
1057 |
3313 |
elsif (ref $item eq 'HASH') { }
|
|
609
|
0 |
8 |
unless $self->{' update'}
|
|
627
|
0 |
8 |
if (defined $self->{' newroot'}) { }
|
|
635
|
0 |
25 |
unless defined $tdict->{$key}
|
|
689
|
170 |
0 |
if (ref $filename) { }
|
|
726
|
170 |
0 |
if defined $self->{'Info'}
|
|
727
|
0 |
170 |
defined $self->{' newroot'} && $self->{' newroot'} ne '' ? :
|
|
733
|
0 |
170 |
if $self->{' loc'}
|
|
734
|
0 |
170 |
if ($self->{' update'})
|
|
736
|
0 |
0 |
unless defined $tdict->{$key}
|
|
745
|
0 |
170 |
if ($^O eq "MacOS" and not ref $self->{' fname'})
|
|
775
|
10 |
1469 |
defined $opts{'update'} ? :
|
|
776
|
1469 |
10 |
if $update
|
|
781
|
162 |
1317 |
if ($str =~ /^<</s) { }
|
|
|
166 |
1151 |
elsif ($str =~ /^([0-9]+)(?:$PDF::Builder::Basic::PDF::File::ws_char|$re_comment)+([0-9]+)(?:$PDF::Builder::Basic::PDF::File::ws_char|$re_comment)+R/s) { }
|
|
|
104 |
1047 |
elsif ($str =~ /^([0-9]+)(?:$PDF::Builder::Basic::PDF::File::ws_char|$re_comment)+([0-9]+)(?:$PDF::Builder::Basic::PDF::File::ws_char|$re_comment)+obj/s) { }
|
|
|
577 |
470 |
elsif ($str =~ m[^/($PDF::Builder::Basic::PDF::File::reg_char*)]s) { }
|
|
|
2 |
468 |
elsif ($str =~ /^\(/) { }
|
|
|
0 |
468 |
elsif ($str =~ /^</) { }
|
|
|
98 |
370 |
elsif ($str =~ /^\[/) { }
|
|
|
0 |
370 |
elsif ($str =~ /^(true|false)($PDF::Builder::Basic::PDF::File::irreg_char|$)/) { }
|
|
|
370 |
0 |
elsif ($str =~ /^([+-.0-9]+)($PDF::Builder::Basic::PDF::File::irreg_char|$)/) { }
|
|
|
0 |
0 |
elsif ($str =~ /^null($PDF::Builder::Basic::PDF::File::irreg_char|$)/) { }
|
|
784
|
160 |
2 |
if $update
|
|
791
|
457 |
0 |
if ($str =~ s[^/($PDF::Builder::Basic::PDF::File::reg_char+)][]) { }
|
|
|
0 |
0 |
elsif ($str =~ s[^/$PDF::Builder::Basic::PDF::File::ws_char+][]) { }
|
|
|
0 |
0 |
elsif ($str =~ s[^//][/]) { }
|
|
802
|
457 |
0 |
unless ref $value eq "PDF::Builder::Basic::PDF::Null"
|
|
815
|
455 |
2 |
if $update
|
|
819
|
160 |
2 |
if $update
|
|
823
|
11 |
151 |
if ($str =~ s/^stream(?:(?:\015\012)|\012|\015)// and $result->{'Length'}->val != 0)
|
|
828
|
11 |
0 |
unless ($opts{'nostreams'})
|
|
829
|
0 |
11 |
if ($length > length $str) { }
|
|
839
|
11 |
0 |
if $update
|
|
844
|
38 |
124 |
if (defined $result->{'Type'} and defined $PDF::Builder::Basic::PDF::File::types{$result->{'Type'}->val})
|
|
855
|
131 |
35 |
unless ($result = $self->test_obj($num, $value))
|
|
876
|
90 |
14 |
if ($result = $self->test_obj($num, $value)) { }
|
|
883
|
100 |
4 |
if $update
|
|
902
|
2 |
0 |
if ($str =~ /^([^\\()]+)(.*)/s)
|
|
908
|
0 |
2 |
if ($str =~ /^(\\[()])/) { }
|
|
|
0 |
2 |
elsif ($str =~ /^\(/) { }
|
|
|
2 |
0 |
elsif ($str =~ /^\)/) { }
|
|
|
0 |
0 |
elsif ($str =~ /^(\\[^()])/) { }
|
|
923
|
2 |
0 |
unless $nested_level
|
|
936
|
0 |
0 |
unless $fh->read($str, 255, length $str)
|
|
953
|
98 |
0 |
if $update
|
|
961
|
782 |
0 |
if $update
|
|
978
|
6 |
362 |
if ($update and $str =~ /^$re_whitespace*$/s || $str =~ /^$re_whitespace+[0-9]+$re_whitespace*$/s)
|
|
982
|
4 |
2 |
if ($str =~ /^$re_whitespace*([0-9]+)$re_whitespace+(?:R|obj)/s)
|
|
1019
|
0 |
86 |
unless $objind eq $res
|
|
1039
|
0 |
94 |
unless defined $num
|
|
1040
|
0 |
94 |
unless defined $gen
|
|
1041
|
0 |
94 |
unless $num =~ /^[0-9]+$/
|
|
1042
|
0 |
94 |
unless $gen =~ /^[0-9]+$/
|
|
1048
|
4 |
90 |
if (ref $object_location)
|
|
1052
|
0 |
4 |
unless $object_stream
|
|
1054
|
4 |
0 |
if $object_stream->{' nofilt'}
|
|
1060
|
0 |
4 |
if ($object_stream->{' streamfile'}) { }
|
|
1070
|
0 |
4 |
unless $map[$index] == $num
|
|
1077
|
2 |
2 |
if ($last_object_in_stream == $num) { }
|
|
1078
|
2 |
0 |
if ($object_stream->{' stream'}) { }
|
|
1090
|
0 |
4 |
if ($object_stream->{' streamfile'}) { }
|
|
1128
|
0 |
1399 |
if (defined $self->{' free'} and scalar @{$self->{' free'};} > 0)
|
|
1130
|
0 |
0 |
if (defined $base) { }
|
|
1144
|
0 |
1400 |
defined $i ? :
|
|
1147
|
0 |
0 |
unless (defined $self->locate_obj($i, $ng))
|
|
1148
|
0 |
0 |
if (defined $base) { }
|
|
1163
|
1399 |
0 |
if (defined $base) { }
|
|
1194
|
1416 |
1637 |
unless (exists $self->{' outlist_cache'}{$obj})
|
|
1247
|
0 |
0 |
if $self->{' objcache'}{join $;, $objind->{' objnum'}, $objind->{' objgen'}} eq $objind
|
|
1274
|
0 |
183 |
unless defined $self->{' OUTFILE'}
|
|
1278
|
183 |
0 |
unless scalar @objects > 0
|
|
1280
|
0 |
1066 |
unless $objind->is_obj($self)
|
|
1283
|
1066 |
0 |
if ($self->{' outlist'}[$i] eq $objind)
|
|
1288
|
0 |
1066 |
if $j < 0
|
|
1291
|
0 |
1066 |
if grep {$_ eq $objind;} @{$$self{" free"};}
|
|
1293
|
0 |
1066 |
if $objind->{' comments'}
|
|
1302
|
1066 |
0 |
unless (exists $self->{' printed_cache'}{$objind})
|
|
1330
|
0 |
0 |
unless defined $outpdf->{$key}
|
|
1337
|
0 |
0 |
unless $nt eq "n"
|
|
1339
|
0 |
0 |
if ($nl < $minl or $mini == 0)
|
|
1344
|
0 |
0 |
unless ($obj = $self->test_obj($i, $ng))
|
|
1354
|
0 |
0 |
defined $filter ? :
|
|
1355
|
0 |
0 |
unless not $res or $res->is_obj($outpdf)
|
|
1362
|
0 |
0 |
if ($obj->isa("PDF::Builder::Basic::PDF::Dict") and $obj->{'Linearized'})
|
|
1395
|
94 |
9 |
if (ref $tdict->{' xref'}{$num})
|
|
1397
|
4 |
90 |
unless scalar @$ref == 3
|
|
1399
|
90 |
0 |
if ($ref->[1] == $gen)
|
|
1400
|
90 |
0 |
if $ref->[2] eq "n"
|
|
1405
|
0 |
9 |
if ($$seen{$tdict->{' loc'}})
|
|
1430
|
0 |
3262 |
if $readDebug
|
|
1431
|
11 |
3251 |
if ($instream) { }
|
|
1436
|
0 |
0 |
if $readDebug
|
|
1442
|
0 |
128 |
if $readDebug
|
|
1447
|
0 |
1 |
if $readDebug
|
|
1524
|
0 |
78 |
if ($width == 3) { }
|
|
|
0 |
78 |
elsif ($width == 5) { }
|
|
|
0 |
78 |
elsif ($width == 6) { }
|
|
|
0 |
78 |
elsif ($width == 7) { }
|
|
1538
|
26 |
52 |
if $width == 1
|
|
1539
|
52 |
0 |
if $width == 2
|
|
1540
|
0 |
0 |
if $width == 4
|
|
1541
|
0 |
0 |
if ($width == 8)
|
|
1549
|
0 |
0 |
if (substr($data, 0, 4) eq "\000\000\000\000") { }
|
|
1569
|
0 |
21 |
if (defined $options{'-diags'} and not defined $options{'diags'})
|
|
1587
|
18 |
3 |
if ($buf =~ s/^xref$PDF::Builder::Basic::PDF::File::cr//i) { }
|
|
|
3 |
0 |
elsif ($buf =~ /^(\d+)\s+(\d+)\s+obj/i) { }
|
|
1604
|
0 |
23 |
unless ($old_buf =~ /^[0-9]+ [0-9]+$PDF::Builder::Basic::PDF::File::cr/)
|
|
1605
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1615
|
0 |
23 |
if ($xnum < 1)
|
|
1616
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1627
|
23 |
0 |
if ($buf =~ /^(.*?)$PDF::Builder::Basic::PDF::File::cr/)
|
|
1630
|
0 |
23 |
if ($entry_size != 20 and $options{'diags'} == 1)
|
|
1644
|
132 |
0 |
if ($buf =~ /^\d{10} \d{5} [nf]$PDF::Builder::Basic::PDF::File::cr/ or $entry_format_error) { }
|
|
1648
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1661
|
0 |
132 |
if (exists $xlist->{$xmin}) { }
|
|
1662
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1667
|
0 |
18 |
if ($xmin == 0 and $subsection_count > 1 and $options{'diags'} == 1)
|
|
1684
|
0 |
0 |
unless (exists $xlist->{'0'} or $xrefListEmpty)
|
|
1687
|
0 |
0 |
if ($subsection_count == 1 and exists $xlist->{'1'}) { }
|
|
1690
|
0 |
0 |
if ($xlist->{'1'}[0] == 0 and $xlist->{'1'}[1] == 65535 and $xlist->{'1'}[2] eq 'f') { }
|
|
1695
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1708
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1714
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1725
|
18 |
114 |
if ($xlist->{$_}[2] eq 'f') { }
|
|
|
114 |
0 |
elsif ($xlist->{$_}[2] eq 'n') { }
|
|
1726
|
0 |
18 |
if ($xlist->{$_}[1] <= 0 and $options{'diags'} == 1) { }
|
|
1732
|
0 |
114 |
if ($xlist->{$_}[0] <= 0 and $options{'diags'} == 1)
|
|
1735
|
0 |
114 |
if ($xlist->{$_}[1] < 0 and $options{'diags'} == 1)
|
|
1739
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1746
|
0 |
18 |
if ($xlist->{'0'}[1] != 65535 and $options{'diags'} == 1)
|
|
1750
|
0 |
18 |
if ($xlist->{$next_free}[2] ne 'f') { }
|
|
1751
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1761
|
0 |
18 |
if (scalar @free_list and $options{'diags'} == 1)
|
|
1766
|
0 |
18 |
if (not $buf =~ /^\s*trailer\b/i and $options{'diags'} == 1)
|
|
1780
|
0 |
3 |
unless ($tdict->{' stream'})
|
|
1781
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1794
|
1 |
2 |
if (defined $tdict->{'Index'}) { }
|
|
1813
|
78 |
0 |
if $w
|
|
1818
|
1 |
25 |
unless defined $cols[0]
|
|
1819
|
0 |
26 |
if ($cols[0] > 2 and $options{'diags'} == 1)
|
|
1823
|
0 |
26 |
if exists $xlist->{$xmin}
|
|
1825
|
1 |
0 |
$xmin ? :
|
|
|
25 |
1 |
defined $cols[2] ? :
|
|
1826
|
2 |
20 |
$cols[0] == 0 ? :
|
|
|
22 |
4 |
if $cols[0] < 2
|
|
1833
|
0 |
0 |
if ($options{'diags'} == 1)
|
|
1843
|
18 |
3 |
if $xmin + 1 > $self->{' maxobj'}
|
|
1845
|
3 |
18 |
if defined $tdict->{'Prev'} and $tdict->{'Prev'}->val != 0
|
|
1846
|
18 |
3 |
unless defined $tdict->{' prev'}
|
|
1876
|
8 |
170 |
if (defined $self->{'Size'}) { }
|
|
1886
|
3 |
175 |
unless $self->{' printed'}
|
|
|
3 |
175 |
unless $self->{' free'}
|
|
1889
|
170 |
8 |
unless ($update)
|
|
1907
|
3 |
175 |
unless $self->{' free'}
|
|
1911
|
190 |
1054 |
if ($i > $#xreflist or $self->{' objects'}{$xreflist[$i]->uid}[0] != $j + 1) { }
|
|
1913
|
178 |
12 |
$first == -1 ? :
|
|
1914
|
178 |
12 |
if ($first == -1)
|
|
1916
|
0 |
178 |
defined $freelist[$k] ? :
|
|
1921
|
0 |
1066 |
if (defined $freelist[$k] and defined $xref and "$freelist[$k]" eq "$xref") { }
|
|
1927
|
0 |
0 |
defined $freelist[$k] ? :
|
|
1937
|
12 |
178 |
if $i < scalar @xreflist
|
|
1947
|
0 |
178 |
if (exists $tdict->{'Type'} and $tdict->{'Type'}->val eq 'XRef') { }
|
|
1952
|
0 |
0 |
@a == 2 ? :
|
|
1961
|
0 |
0 |
$tloc > 65535 ? :
|
|
1962
|
0 |
0 |
$tloc > 65535 ? :
|
|
1969
|
0 |
0 |
if $_->[1] == 65535 and $_->[2] eq "f"
|
|
1972
|
0 |
0 |
if ($_->[1] > 255)
|
|
1976
|
0 |
0 |
$_->[2] eq 'n' ? :
|