Branch Coverage

blib/lib/CAD/Mesh3D/FormatSTL.pm
Criterion Covered Total %
branch 59 84 70.2


line true false branch
145 1 4 unless @{$self->{'parts'};}
148 2 2 unless exists $self->{'parts'}[$index]
176 6 7 if (@and)
177 1 5 if @and > 1
183 11 1 unless ((ref $file || '') eq "GLOB")
184 1 10 unless open my $fh, "<", $file
190 6 5 unless ($mode)
191 0 6 unless (seek $file, 0, 0)
199 1 5 unless read $fh, $buf, 4
202 1 5 if $@
203 1 4 unless $count
215 1 3 $size == $expect ? :
217 0 5 unless seek $file, 0, 0
221 0 10 unless $self->can($method)
241 0 357 unless length $line
251 6 56 if ($line =~ /^\s*solid (.*)/) { }
5 51 elsif ($line =~ /^\s*endsolid (.*)/) { }
50 1 elsif ($part) { }
256 0 5 unless $part
257 0 5 unless $name eq $part->name
263 0 50 unless my(@n) = $line =~ /^\s*facet\s+normal\s+$p_re/
269 1 49 unless ($next and $next =~ /^\s*outer\s+loop$/)
275 49 147 if $line =~ /^\s*endloop$/
276 147 0 if ($line =~ /^\s*vertex\s+$p_re/)
282 0 49 unless scalar @facet == 4
285 0 49 unless $end and $end =~ /^\s*endfacet/
293 0 5 if $part
327 0 3 unless read $fh, $buf, 4
335 3 609 unless read $fh, $buf, 4
343 1 50 unless read $fh, $buf, 2
359 0 3 if $self->parts
376 3 48 if eof $fh
378 1 2 unless $count == $triangles
396 0 1 if (@and)
397 0 0 if @and > 1
403 0 1 unless ((ref $file || '') eq "GLOB")
404 0 0 unless open my $fh, ">", $file
409 1 0 unless $mode
412 0 1 unless $self->can($method)
429 0 0 if @and
457 0 1 unless my(@parts) = $self->parts
467 0 12 unless @pts == 3