Branch Coverage

blib/lib/Text/PDF/Dict.pm
Criterion Covered Total %
branch 24 84 28.5


line true false branch
16 1 0 -d '/tmp' ? :
57 0 10 if ref $class
80 0 7 if (defined $self->{' stream'} or defined $self->{' streamfile'} or defined $self->{' streamloc'})
82 0 1 if ($self->{'Filter'} or not defined $self->{' stream'}) { }
84 0 0 unless defined $self->{'Length'}
85 0 0 unless $self->{'Length'}->is_obj($pdf)
90 0 1 $self->{' stream'} =~ /$Text::PDF::Dict::cr$/o ? :
98 5 11 if (defined $self->{$_})
107 24 15 if $key =~ /^[\s\-]/o or $specs{$key}
109 0 15 if $val eq ''
118 0 8 if (defined $self->{' streamloc'} and not defined $self->{' stream'})
125 0 8 if (not $self->{' nofilt'} and defined $self->{' stream'} || defined $self->{' streamfile'} and defined $self->{'Filter'})
132 0 0 if (ref $self->{'Filter'} eq 'Text::PDF::Name') { }
141 0 0 if ($temp eq 'LZWDecode') { }
0 0 elsif ($temp eq 'FlateDecode') { }
143 0 0 if ($hasflate < -1)
155 0 0 if $hasflate > -1
158 1 7 if (defined $self->{' stream'}) { }
0 7 elsif (defined $self->{' streamfile'}) { }
163 1 0 unless ($self->{' nofilt'})
169 0 1 if (@filts > 0)
172 0 0 if ($self->{'Length'}{'val'} != $len)
175 0 0 if $self->{'Length'}->is_obj($pdf)
178 1 0 unless $str =~ /$Text::PDF::Dict::cr$/o
183 0 0 unless open DICTFH, $self->{' streamfile'}
189 0 0 unless ($self->{' nofilt'})
197 0 0 unless ($self->{' nofilt'})
206 0 0 if ($self->{'Length'}{'val'} != $len)
209 0 0 if $self->{'Length'}->is_obj($pdf)
212 0 0 unless $str =~ /$Text::PDF::Dict::cr$/o
239 0 1 if (defined $self->{'Filter'})
249 0 1 if (defined $self->{' streamfile'})
257 1 0 if ($i + 4096 > $len) { }
267 0 1 if (not $force_memory || defined $self->{' streamfile'} and length($self->{' stream'}) * 2 > $Text::PDF::Dict::mincache)
269 0 0 unless open DICTFH, ">$Text::PDF::Dict::tempbase"
276 0 1 if (defined $self->{' streamfile'}) { }
282 0 1 if defined $self->{' streamfile'}
312 0 0 if $self->dont_copy($k)
313 0 0 if defined $res->{$k}
314 0 0 if (UNIVERSAL::can($self->{$k}, 'is_obj')) { }
316 0 0 if (grep {"$path/$k" =~ /$_/;} @{$opts{'clip'};}) { }
319 0 0 $unique ? :