Branch Coverage

blib/lib/Text/Shoebox.pm
Criterion Covered Total %
branch 66 126 52.3


line true false branch
131 12 9 if (exists $options{'into'}) { }
139 0 21 if (exists $options{'from_handle'}) { }
21 0 elsif (exists $options{'from_file'}) { }
141 0 0 if exists $options{'rs'}
146 0 21 unless open IN, "<$from_file"
151 11 10 if (exists $options{'rs'}) { }
159 10 0 if (defined $chunk and $chunk =~ /(\cm\cj|\cm|\cj)/s) { }
162 0 0 if $Text::Shoebox::Debug
170 0 21 if $Text::Shoebox::Debug
183 0 210 if (length $line > 1 and substr($line, 0, 2) eq '\\_')
188 105 105 if ($line =~ /^\\(\S+) ?(.*)/s) { }
195 0 105 if $Debug > 1
197 84 21 if (@new_entries) { }
198 21 63 if ($1 eq $hw_field) { }
202 21 0 if substr($new_entries[-1][-1], -1, 1) eq "\n"
222 0 105 if $last_field_was_comment
224 0 105 if $Debug > 1
225 105 0 if (@new_entries) { }
236 0 0 if $line =~ /\S/s
243 21 0 if $to_close
245 0 21 if $Debug
247 0 21 unless @new_entries
303 11 0 if (exists $options{'from'}) { }
306 0 0 unless defined $from and ref $from
311 0 11 if (exists $options{'to_handle'}) { }
11 0 elsif (exists $options{'to_file'}) { }
313 0 0 if $Text::Shoebox::Debug
318 0 11 if $Text::Shoebox::Debug
319 0 11 unless open OUT, ">$dest"
327 9 2 if (exists $options{'rs'}) { }
330 0 9 unless defined $nl
331 0 9 unless length $nl
332 0 9 if ref $nl
340 2 9 unless $nl =~ /^[\cm\cj]+$/s
347 0 22 unless (defined($e = $$from[$i_entry]) and ref $e eq 'ARRAY' || UNIVERSAL::isa($e, 'ARRAY'))
354 0 0 if $Text::Shoebox::Debug
358 0 22 unless (@$e)
359 0 0 if $Text::Shoebox::Debug
363 11 11 if ($am_first_entry) { }
366 0 11 unless print $fh $nl
371 0 55 unless (defined($k = $$e[$i]) and length $k)
378 10 45 if ($nl_is_weird) { }
386 0 55 unless (length $k)
387 0 0 if $Text::Shoebox::Debug
391 55 0 if (defined($v = $$e[1 + $i])) { }
394 44 11 if (length $v)
396 20 24 if $nl ne "\n"
402 44 11 length $v ? :
0 55 unless length $v ? print($fh '\\', $k, ' ', $v, $nl) : print($fh '\\', $k, $nl)
408 0 11 if $to_close
425 0 1 unless @_ == 1
428 0 1 unless defined $lex and ref $lex eq 'ARRAY'
430 0 1 unless @$lex
435 0 2 unless @{$e = $$lex[$i];}
436 0 2 unless defined $$e[0]
438 1 1 if (defined $hw_key) { }
439 0 1 if ($$e[0] ne $hw_key)
440 0 0 if $Text::Shoebox::Debug
448 0 1 unless defined $hw_key
470 5 0 defined $$e[1] ? :
1 4 if @$e and $seen{defined $$e[1] ? $$e[1] : ''}++
502 0 0 unless defined $e and ref $e and UNIVERSAL::isa($e, 'ARRAY')
508 0 0 ($toggle ^= 1) ? :