Branch Coverage

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


line true false branch
70 0 2029 if ref $class
85 27 0 if (scalar @_)
87 0 27 ref $type ? :
89 0 27 unless exists $self->{'Type'}
110 0 14 ref $_ ? :
132 1 1486 if (defined $self->{' stream'} or defined $self->{' streamfile'} or defined $self->{' streamloc'})
133 3 163 if ($self->{'Filter'} and $self->{' nofilt'}) { }
14 149 elsif ($self->{'Filter'} or not defined $self->{' stream'}) { }
136 14 0 unless defined $self->{'Length'}
137 14 0 unless $self->{'Length'}->is_obj($pdf)
145 70 32965 $b eq 'Subtype' ? :
92 33035 $a eq 'Subtype' ? :
735 33127 $b eq 'Type' ? :
1024 33862 $a eq 'Type' ? :
148 8813 4304 if $key =~ /^[\s\-]/o
149 0 4304 unless $self->{$key}
159 0 1652 if (defined $self->{' streamloc'} and not defined $self->{' stream'})
166 14 0 if (not $self->{' nofilt'} and defined $self->{'Filter'} and defined $self->{' stream'} || defined $self->{' streamfile'})
171 0 14 if ($filter eq 'LZWDecode') { }
13 1 elsif ($filter eq 'FlateDecode') { }
172 0 0 if ($hasflate < -1)
184 0 14 if $hasflate > -1
187 165 1487 if (defined $self->{' stream'}) { }
1 1486 elsif (defined $self->{' streamfile'}) { }
191 162 3 unless ($self->{' nofilt'})
200 0 1 unless open my $dictfh, "<", $self->{' streamfile'}
207 0 1 unless ($self->{' nofilt'})
215 0 1 unless ($self->{' nofilt'})
225 166 1486 if (defined $self->{' stream'} or defined $self->{' streamfile'})
227 14 152 unless ($self->{'Length'}{'val'} == $length)
229 14 0 if $self->{'Length'}->is_obj($pdf)
257 3 4 if (defined $self->{'Filter'})
261 0 0 do { $self->{'DecodeParms'}->isa('PDF::Builder::Basic::PDF::Array') } ? :
0 0 do { $self->{'DecodeParms'}->isa('PDF::Builder::Basic::PDF::Dict') if $self->{'Filter'}->isa('PDF::Builder::Basic::PDF::Name') } ? :
0 3 $self->{'DecodeParms'} ? :
263 0 0 if $self->{'Filter'}->isa("PDF::Builder::Basic::PDF::Name")
276 0 7 if (defined $self->{' streamfile'})
286 7 0 if ($i + $readlen > $len) { }
298 0 7 if (not $force_memory || defined $self->{' streamfile'} and length($self->{' stream'}) + length($data) > $mincache)
307 0 7 if (defined $self->{' streamfile'}) { }
314 0 7 if defined $self->{' streamfile'}