Condition Coverage

blib/lib/Text/PDF/File.pm
Criterion Covered Total %
condition 20 64 31.2


and 3 conditions

line !l l&&!r l&&r condition
447 1 0 0 defined $self->{' newroot'} && $self->{' newroot'} ne ''
467 1 0 0 $^O eq 'MacOS' and not ref $self->{' fname'}
509 1 0 1 $str =~ s/^stream(?:(?:\015\012)|\012)//o and $res->{'Length'}->val != 0
532 2 0 0 defined $res->{'Type'} and defined $Text::PDF::File::types{$res->{'Type'}->val}
716 5 0 0 defined $self->{' free'} and scalar @{$self->{' free'};} > 0
737 5 0 0 defined $i and $i != 0
944 0 0 0 $obj->isa('Text::PDF::Dict') and $obj->{'Linearized'}
1079 1 0 6 $xnum-- > 0 and $buf =~ s/^0*([0-9]*)$Text::PDF::File::ws_char+0*([0-9]+)$Text::PDF::File::ws_char+([nf])$Text::PDF::File::cr//o
1093 1 0 0 defined $tdict->{'Prev'} and $tdict->{'Prev'}->val != 0
1184 5 0 0 defined $freelist[$k] and defined $xref
5 0 0 defined $freelist[$k] and defined $xref and "$freelist[$k]" eq "$xref"

or 2 conditions

line l !l condition
250 1 0 'IO::File'->new(($update ? '+' : '') . "<$fname") || (return undef)
423 1 0 'IO::File'->new(">$fname") || die("Unable to open $fname for writing")
428 0 1 $self->{' version'} || '2'
675 0 0 $self->read_objnum($objind->{' objnum'}, $objind->{' objgen'}, %opts) || (return undef)
692 0 0 $self->locate_obj($num, $gen) || (return undef)

or 3 conditions

line l !l&&r !l&&!r condition
453 0 1 0 $self->{'Size'} || PDFNum(1)
749 0 0 0 $self->test_obj($i, $ng) || $self->add_obj('Text::PDF::Objind'->new, $i, $ng)
920 0 0 0 $nl < $minl or $mini == 0
937 0 0 0 not $res or $res->is_obj($out)
1000 15 0 2 $str =~ /$Text::PDF::File::cr/o or $fh->eof
1006 0 0 0 $str =~ /$Text::PDF::File::cr/o or $fh->eof
1173 1 0 5 $i > $#xreflist or $self->{' objects'}{$xreflist[$i]->uid}[0] != $j + 1