Condition Coverage

blib/lib/PDF/Builder/Basic/PDF/File.pm
Criterion Covered Total %
condition 55 137 40.1


and 3 conditions

line !l l&&!r l&&r condition
276 0 15 0 defined $2 and length $2 > 0
340 4215 238 1800 &blessed($item) and $item->can('release')
467 119 0 0 defined $self->{' newroot'} && $self->{' newroot'} ne ''
485 119 0 0 $^O eq 'MacOS' and not ref $self->{' fname'}
557 123 0 11 $str =~ s/^stream(?:(?:\015\012)|\012|\015)// and $result->{'Length'}->val != 0
578 79 24 31 defined $result->{'Type'} and defined $PDF::Builder::Basic::PDF::File::types{$result->{'Type'}->val}
712 2 343 4 $update and $str =~ /^$re_whitespace*$/s || $str =~ /^$re_whitespace+[0-9]+$re_whitespace*$/s
844 1010 10 0 defined $self->{' free'} and scalar @{$self->{' free'};} > 0
861 1021 0 0 defined $i and $i != 0
1048 0 0 0 $obj->isa('PDF::Builder::Basic::PDF::Dict') and $obj->{'Linearized'}
1277 20 0 0 $entry_size != 20 and $options{'-diags'} == 1
1288 20 0 104 $xnum-- > 0 and $buf =~ /^$PDF::Builder::Basic::PDF::File::ws_char*(\d+)$PDF::Builder::Basic::PDF::File::ws_char+(\d+)$PDF::Builder::Basic::PDF::File::ws_char+([nf])$PDF::Builder::Basic::PDF::File::ws_char*$PDF::Builder::Basic::PDF::File::cr/
1314 89 15 0 $xmin == 0 and $subsection_count > 1
104 0 0 $xmin == 0 and $subsection_count > 1 and $options{'-diags'} == 1
1334 0 0 0 $subsection_count == 1 and exists $xlist->{'1'}
1337 0 0 0 $xlist->{'1'}[0] == 0 and $xlist->{'1'}[1] == 65535
0 0 0 $xlist->{'1'}[0] == 0 and $xlist->{'1'}[1] == 65535 and $xlist->{'1'}[2] eq 'f'
1373 15 0 0 $xlist->{$_}[1] <= 0 and $options{'-diags'} == 1
1379 89 0 0 $xlist->{$_}[0] <= 0 and $options{'-diags'} == 1
1382 89 0 0 $xlist->{$_}[1] < 0 and $options{'-diags'} == 1
1393 15 0 0 $xlist->{'0'}[1] != 65535 and $options{'-diags'} == 1
1407 0 15 0 $next_free and exists $xlist->{$next_free}
1408 15 0 0 scalar @free_list and $options{'-diags'} == 1
1413 15 0 0 not $buf =~ /^\s*trailer\b/i and $options{'-diags'} == 1
1467 26 0 0 $cols[0] > 2 and $options{'-diags'} == 1
1493 15 0 3 defined $tdict->{'Prev'} and $tdict->{'Prev'}->val != 0
1570 752 0 0 defined $freelist[$k] and defined $xref
752 0 0 defined $freelist[$k] and defined $xref and "$freelist[$k]" eq "$xref"
1596 127 0 0 exists $tdict->{'Type'} and $tdict->{'Type'}->val eq 'XRef'
1618 0 0 0 $_->[1] == 65535 and $_->[2] eq 'f'

or 2 conditions

line l !l condition
260 0 0 'IO::File'->new(($update ? '+' : '') . "<$filename") || (return)
377 8 0 $self->{' version'} || 1.4
438 0 0 'IO::File'->new(">$filename") || die("Unable to open $filename for writing")
443 119 0 $self->{' version'} || '1.4'
746 68 0 $self->read_objnum($objind->{' objnum'}, $objind->{' objgen'}, %opts) || (return)
766 76 0 $self->locate_obj($num, $gen) || (return)
1487 18 0 $xmin ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
472 0 119 0 $self->{'Size'} || PDFNum(1)
712 4 2 341 $str =~ /^$re_whitespace*$/s || $str =~ /^$re_whitespace+[0-9]+$re_whitespace*$/s
868 0 0 0 $self->test_obj($i, $ng) || $self->add_obj('PDF::Builder::Basic::PDF::Objind'->new, $i, $ng)
1025 0 0 0 $nl < $minl or $mini == 0
1041 0 0 0 not $res or $res->is_obj($outpdf)
1104 11 0 0 $str =~ /endstream/ or $fh->eof
1110 2806 42 107 $str =~ /$PDF::Builder::Basic::PDF::File::cr/ or $fh->eof
1117 1 0 0 $str =~ /$PDF::Builder::Basic::PDF::File::cr/ or $fh->eof
1291 104 0 0 $buf =~ /^\d{10} \d{5} [nf]$PDF::Builder::Basic::PDF::File::cr/ or $entry_format_error
1331 15 0 0 exists $xlist->{'0'} or $xrefListEmpty
1560 127 12 740 $i > $#xreflist or $self->{' objects'}{$xreflist[$i]->uid}[0] != $j + 1