Branch Coverage

blib/lib/Anki/Import.pm
Criterion Covered Total %
branch 52 62 83.8


line true false branch
58 0 8 unless ($file)
66 0 8 if ($args->{'verbose'}) { }
4 4 elsif ($args->{'vverbose'}) { }
78 1 7 unless (-e $path)
81 0 7 unless open my $handle, '<:encoding(UTF-8)', $path
94 0 6 unless ($args->{'quiet'})
108 0 7 unless $lines[0]
115 0 32 if $cline =~ /^$|^\s+$/
117 9 23 if ($cline =~ /^#\s*(\S+)/)
131 13 10 if (my $number_of_fields = $fields{$ntype}) { }
132 1 12 if (scalar @$note != $number_of_fields)
162 76 67 if ($cline =~ /^$|^\s+$/) { }
164 60 16 if @current_field
166 16 60 if ($lline =~ /^$|^\s+$/)
177 13 175 unless @lines
212 0 10 unless open my $handle, '>>:encoding(UTF-8)', $out_path
239 0 190 if ($line =~ /^\+\s*$/ and not $ws_mode)
243 2 188 if ($line =~ /^\^\s*$/ and not $ws_mode)
250 29 159 if ($line =~ /^`\s*$/ and not $ws_mode)
251 9 20 if ($$last_line and not $$last_line =~ /^
+$/)
258 11 148 if ($line =~ /^`{3,3}$/ and not $ws_mode)
262 9 2 if ($$last_line)
271 11 137 if ($line =~ /^`{3,3}$/ and $ws_mode)
278 28 109 if ($ws_mode) { }
280 4 24 if ($line =~ /^`\s*$/)
292 0 113 if $ws_mode
298 111 2 unless $lines[0]
312 106 14 if $count % 2
336 3 44 if (@autotags and not $new_autotags)
345 0 1 unless $in_autotags
351 8 1 unless $discard_autotag