Branch Coverage

blib/lib/Anki/Import.pm
Criterion Covered Total %
branch 50 60 83.3


line true false branch
58 0 7 unless ($file)
66 0 7 if ($args->{'verbose'}) { }
3 4 elsif ($args->{'vverbose'}) { }
78 1 6 unless (-e $path)
81 0 6 unless open my $handle, '<:encoding(UTF-8)', $path
94 0 5 unless ($args->{'quiet'})
108 0 6 unless $lines[0]
115 0 30 if $cline =~ /^$|^\s+$/
117 8 22 if ($cline =~ /^#\s*(\S+)/)
131 13 9 if (my $number_of_fields = $fields{$ntype}) { }
132 1 12 if (scalar @$note != $number_of_fields)
162 71 63 if ($cline =~ /^$|^\s+$/) { }
164 55 16 if @current_field
166 16 55 if ($lline =~ /^$|^\s+$/)
177 11 164 unless @lines
212 0 9 unless open my $handle, '>>:encoding(UTF-8)', $out_path
239 0 177 if ($line =~ /^\+\s*$/ and not $ws_mode)
243 2 175 if ($line =~ /^\^\s*$/ and not $ws_mode)
250 29 146 if ($line =~ /^`\s*$/ and not $ws_mode)
251 9 20 if ($$last_line and not $$last_line =~ /^
+$/)
258 10 136 if ($line =~ /^`{3,3}$/ and not $ws_mode)
262 9 1 if ($$last_line)
271 10 126 if ($line =~ /^`{3,3}$/ and $ws_mode)
278 23 103 if ($ws_mode) { }
280 2 21 if ($line =~ /^`\s*$/)
292 0 106 if $ws_mode
298 105 1 unless $lines[0]
324 3 42 if (@autotags and not $new_autotags)
333 0 1 unless $in_autotags
339 8 1 unless $discard_autotag