Condition Coverage

blib/lib/PDF/API2/Basic/PDF/File.pm
Criterion Covered Total %
condition 41 90 45.5


and 3 conditions

line !l l&&!r l&&r condition
389 4694 294 2115 &blessed($item) and $item->can("release")
532 145 0 0 defined $self->{' newroot'} && $self->{' newroot'} ne ''
550 145 0 0 $^O eq "MacOS" and not ref $self->{' fname'}
619 136 0 10 $str =~ s/^stream(?:(?:\015\012)|\012|\015)// and $result->{'Length'}->val != 0
641 87 25 34 defined $result->{'Type'} and defined $PDF::API2::Basic::PDF::File::types{$result->{'Type'}->val}
787 2 80 4 $update and $str =~ /^$re_whitespace*$/s || $str =~ /^$re_whitespace+[0-9]+$re_whitespace*$/s
925 1057 15 0 defined $self->{' free'} and scalar @{$self->{' free'};} > 0
943 1073 0 0 defined $i and $i != 0
1128 0 0 0 $obj->isa("PDF::API2::Basic::PDF::Dict") and $obj->{'Linearized'}
1296 21 0 118 $xnum-- > 0 and $buf =~ s/^0*([0-9]*)$PDF::API2::Basic::PDF::File::ws_char+0*([0-9]+)$PDF::API2::Basic::PDF::File::ws_char+([nf])$PDF::API2::Basic::PDF::File::cr//
1375 16 0 3 defined $tdict->{'Prev'} and $tdict->{'Prev'}->val != 0
1444 890 0 0 defined $freelist[$k] and defined $xref
890 0 0 defined $freelist[$k] and defined $xref and "$freelist[$k]" eq "$xref"
1465 148 0 0 exists $tdict->{'Type'} and $tdict->{'Type'}->val eq "XRef"
1484 0 0 0 $_->[2] eq "f" and $_->[1] == 65535

or 2 conditions

line l !l condition
231 8 0 'IO::File'->new(($update ? '+' : '') . "<$filename") || die("Error opening '${filename}': $!")
477 0 0 'IO::File'->new(">$filename") || die("Unable to open $filename for writing")
482 140 0 $self->{' version'} // "1.4"
505 0 0 'IO::File'->new(">$filename") || die("Unable to open $filename for writing")
592 398 0 ref $value // ""
599 0 0 ref $value // ""
606 0 0 ref $value // ""
824 77 0 $self->read_objnum($objind->{' objnum'}, $objind->{' objgen'}, %opts) || (return)
843 85 0 $self->locate_obj($num, $gen) || (return)

or 3 conditions

line l !l&&r !l&&!r condition
537 5 140 0 $self->{'Size'} || PDFNum(1)
787 4 2 78 $str =~ /^$re_whitespace*$/s || $str =~ /^$re_whitespace+[0-9]+$re_whitespace*$/s
951 0 0 0 $self->test_obj($i, $ng) || $self->add_obj('PDF::API2::Basic::PDF::Objind'->new, $i, $ng)
1105 0 0 0 $nl < $minl or $mini == 0
1121 0 0 0 not $res or $res->is_obj($out)
1184 10 0 0 $str =~ /endstream/ or $fh->eof
1191 1888 42 107 $str =~ /$PDF::API2::Basic::PDF::File::cr/ or $fh->eof
1198 1 0 0 $str =~ /$PDF::API2::Basic::PDF::File::cr/ or $fh->eof
1436 148 12 878 $i > $#xreflist or $self->{' objects'}{$xreflist[$i]->uid}[0] != $j + 1