blib/lib/PDF/Tiny.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 81 | 136 | 59.5 |
line | l | !l | condition |
---|---|---|---|
262 | 12 | 0 | $node->[1]{$_} and not $temp_copy->[1]{$_} and $temp_copy->[1]{$_} = $node->[1]{$_} |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
150 | 2 | 0 | 0 | $ix and $gen != 65535 |
257 | 0 | 6 | 0 | $temp_copy->[1]{'Resources'} && $temp_copy->[1]{'MediaBox'} && $temp_copy->[1]{'CropBox'} |
0 | 4 | 4 | not $temp_copy->[1]{'Resources'} && $temp_copy->[1]{'MediaBox'} && $temp_copy->[1]{'CropBox'} and $node->[1]{'Parent'} | |
262 | 8 | 4 | 0 | $node->[1]{$_} and not $temp_copy->[1]{$_} |
290 | 0 | 0 | 0 | $page->[1]{'Resources'} && $page->[1]{'MediaBox'} && $page->[1]{'CropBox'} |
0 | 0 | 0 | not $page->[1]{'Resources'} && $page->[1]{'MediaBox'} && $page->[1]{'CropBox'} and $node->[1]{'Parent'}[1] ne $pages_id | |
294 | 0 | 0 | 0 | $node->[1]{$_} and $page->[1]{$_} = $node->[1]{$_} |
322 | 0 | 4 | 0 | @{$id_array->[1];} == 2 and $self->vivify_obj('str', $id_array, 0)->[1] ne $self->[3] || $self->vivify_obj('str', $id_array, 1)->[1] ne $self->[3] |
399 | 1 | 0 | 3 | @{$id_array->[1];} == 2 and $self->vivify_obj('str', $id_array, 0)->[1] ne $self->[3] |
494 | 0 | 2 | 2 | @_ == 1 and not $_[0] =~ m[^/] |
553 | 3 | 66 | 0 | $id and $read_id ne $id |
641 | 0 | 73 | 31 | $obj and $obj->[0] eq 'ref' |
741 | 4 | 0 | 16 | $id && ($cach->{$id} || die("Internal error: $obj got uncached")) |
855 | 0 | 0 | 0 | $pa <= $pb && $pa <= $pc |
884 | 209 | 1112 | 168 | $more and length $_ < 500 |
894 | 0 | 613 | 827 | defined $endtoken and length $2 |
613 | 744 | 83 | defined $endtoken and length $2 and $1 =~ /$endtoken/ | |
925 | 1043 | 1 | 3 | length($_) + length($line) > 254 and /^$S*([(<])/o |
948 | 81 | 961 | 2 | length $line and !($line =~ /$D\z/o || /^$D/o) || length($line) + length($_) > 254 |
982 | 16 | 83 | 199 | @$tokens >= 2 and $tokens->[0] =~ /^\d+$/ |
99 | 67 | 132 | @$tokens >= 2 and $tokens->[0] =~ /^\d+$/ and $tokens->[1] eq 'R' | |
258 | 166 | 132 | $_ =~ /^\d+$/ and (@$tokens >= 2 and $tokens->[0] =~ /^\d+$/ and $tokens->[1] eq 'R') | |
21 | 0 | 8 | /^[+\-]?[\d\.]+$/ and tr/.// == 1 |
line | l | !l | condition |
---|---|---|---|
76 | 1 | 1 | $opts{'version'} || 1.4 |
210 | 11 | 0 | shift() || $self->get_obj('/Root', '/Pages') || (return wantarray ? () : 0) |
383 | 2 | 0 | ($args{'fh'} // $args{'filename'}) // croak('No file to write to!') |
511 | 5 | 66 | $self->[10]{$id} || (next) |
516 | 66 | 0 | $self->[8]{$id} || (return $null) |
533 | 0 | 0 | $self->[10]{$id} ||= ['flat', substr($$stream, $off, @numbers ? $numbers[1] - $off : length $$stream)] |
700 | 2 | 2 | ($self->[12] ||= do { require Hash::Util::FieldHash; &Hash::Util::FieldHash::fieldhash({}) })->{$spdf} ||= {} |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
246 | 4 | 0 | 0 | $pages[$num] || croak("No such page: $num") |
278 | 0 | 2 | 2 | $whither // @{$pages_array->[1];} |
322 | 0 | 0 | 4 | $self->vivify_obj('str', $id_array, 0)->[1] ne $self->[3] || $self->vivify_obj('str', $id_array, 1)->[1] ne $self->[3] |
328 | 4 | 0 | 0 | $self->vivify_obj('str', $id_array, 0)->[1] ||= time . '' ^ '' . (rand) ^ '' . (0 + $self) |
383 | 2 | 2 | 0 | $args{'fh'} // $args{'filename'} |
495 | 1 | 1 | 0 | $_[0] =~ /^[0-9]+ [0-9]+\z/ or $_[0] eq 'trailer' |
622 | 54 | 40 | 0 | $self->[10]{$obj} || $self->read_obj($obj) |
643 | 16 | 15 | 0 | $self->[10]{$obj->[1]} || $self->read_obj($obj->[1]) |
700 | 2 | 2 | 0 | $self->[12] ||= do { require Hash::Util::FieldHash; &Hash::Util::FieldHash::fieldhash({}) } |
743 | 16 | 4 | 0 | $ret ||= $clone |
767 | 0 | 23 | 0 | shift @{$$self[7];} || $self->[6]++ . ' 0' |
783 | 2 | 0 | 1 | $self->get_obj($stream, '/DecodeParms') || $self->get_obj($stream, '/DP') |
806 | 0 | 2 | 0 | $predictor == 1 or $predictor >= 10 |
884 | 0 | 0 | 1321 | not length $_ or length $_ == $prev_length |
948 | 428 | 2 | 533 | !($line =~ /$D\z/o || /^$D/o) || length($line) + length($_) > 254 |
982 | 172 | 0 | 29 | /^[+\-]?\d+$/ or /^[+\-]?[\d\.]+$/ and tr/.// == 1 |
1104 | 36 | 0 | 101 | not $_ or $_ == 0 |