Branch Coverage

blib/lib/PDF/API2/Basic/PDF/Dict.pm
Criterion Covered Total %
branch 52 82 63.4


line true false branch
58 0 1632 if ref $class
73 28 0 if (scalar @_)
75 0 28 ref $type ? :
77 0 28 unless exists $self->{'Type'}
99 0 14 ref $_ ? :
120 1 1218 if (defined $self->{' stream'} or defined $self->{' streamfile'} or defined $self->{' streamloc'})
121 9 126 if ($self->{'Filter'} and $self->{' nofilt'}) { }
15 111 elsif ($self->{'Filter'} or not defined $self->{' stream'}) { }
125 15 0 unless defined $self->{'Length'}
126 15 0 unless $self->{'Length'}->is_obj($pdf)
135 82 21540 $b eq 'Subtype' ? :
69 21622 $a eq 'Subtype' ? :
631 21691 $b eq 'Type' ? :
750 22322 $a eq 'Type' ? :
138 6240 3371 if $key =~ /^[\s\-]/o
139 0 3371 unless $self->{$key}
149 0 1353 if (defined $self->{' streamloc'} and not defined $self->{' stream'})
156 15 0 if (not $self->{' nofilt'} and defined $self->{'Filter'} and defined $self->{' stream'} || defined $self->{' streamfile'})
161 0 15 if ($filter eq 'LZWDecode') { }
13 2 elsif ($filter eq 'FlateDecode') { }
162 0 0 if ($hasflate < -1)
175 0 15 if $hasflate > -1
178 134 1219 if (defined $self->{' stream'}) { }
1 1218 elsif (defined $self->{' streamfile'}) { }
182 126 8 unless ($self->{' nofilt'})
192 0 1 unless open my $dictfh, "<", $self->{' streamfile'}
199 0 1 unless ($self->{' nofilt'})
207 0 1 unless ($self->{' nofilt'})
217 135 1218 if (defined $self->{' stream'} or defined $self->{' streamfile'})
219 15 120 unless ($self->{'Length'}{'val'} == $length)
221 15 0 if $self->{'Length'}->is_obj($pdf)
248 3 4 if (defined $self->{'Filter'})
252 0 0 do { $self->{'DecodeParms'}->isa('PDF::API2::Basic::PDF::Array') } ? :
0 0 do { $self->{'DecodeParms'}->isa('PDF::API2::Basic::PDF::Dict') if $self->{'Filter'}->isa('PDF::API2::Basic::PDF::Name') } ? :
0 3 $self->{'DecodeParms'} ? :
255 0 0 if $self->{'Filter'}->isa("PDF::API2::Basic::PDF::Name")
270 0 7 if (defined $self->{' streamfile'})
280 7 0 if ($i + $readlen > $len) { }
293 0 7 if (not $force_memory || defined $self->{' streamfile'} and length($self->{' stream'}) + length($data) > $mincache)
300 0 7 if (defined $self->{' streamfile'}) { }
308 0 7 if defined $self->{' streamfile'}