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}
108 0 15 if $val eq ''
117 0 8 if (defined $self->{' streamloc'} and not defined $self->{' stream'})
124 0 8 if (not $self->{' nofilt'} and defined $self->{' stream'} || defined $self->{' streamfile'} and defined $self->{'Filter'})
131 0 0 if (ref $self->{'Filter'} eq 'Text::PDF::Name') { }
140 0 0 if ($temp eq 'LZWDecode') { }
0 0 elsif ($temp eq 'FlateDecode') { }
142 0 0 if ($hasflate < -1)
154 0 0 if $hasflate > -1
157 1 7 if (defined $self->{' stream'}) { }
0 7 elsif (defined $self->{' streamfile'}) { }
162 1 0 unless ($self->{' nofilt'})
168 0 1 if (@filts > 0)
171 0 0 if ($self->{'Length'}{'val'} != $len)
174 0 0 if $self->{'Length'}->is_obj($pdf)
177 1 0 unless $str =~ /$Text::PDF::Dict::cr$/o
182 0 0 unless open DICTFH, $self->{' streamfile'}
188 0 0 unless ($self->{' nofilt'})
196 0 0 unless ($self->{' nofilt'})
205 0 0 if ($self->{'Length'}{'val'} != $len)
208 0 0 if $self->{'Length'}->is_obj($pdf)
211 0 0 unless $str =~ /$Text::PDF::Dict::cr$/o
238 0 1 if (defined $self->{'Filter'})
248 0 1 if (defined $self->{' streamfile'})
256 1 0 if ($i + 4096 > $len) { }
266 0 1 if (not $force_memory || defined $self->{' streamfile'} and length($self->{' stream'}) * 2 > $Text::PDF::Dict::mincache)
268 0 0 unless open DICTFH, ">$Text::PDF::Dict::tempbase"
275 0 1 if (defined $self->{' streamfile'}) { }
281 0 1 if defined $self->{' streamfile'}
311 0 0 if $self->dont_copy($k)
312 0 0 if defined $res->{$k}
313 0 0 if (UNIVERSAL::can($self->{$k}, 'is_obj')) { }
315 0 0 if (grep {"$path/$k" =~ /$_/;} @{$opts{'clip'};}) { }
318 0 0 $unique ? :