Branch Coverage

blib/lib/Text/CSV/R.pm
Criterion Covered Total %
branch 71 76 93.4


line true false branch
52 13 519 if (defined $ret{$k} and $$R_OPT_MAP{$k})
108 2 36 if (openhandle $file)
112 1 35 if (defined $$opts{'encoding'} and length $$opts{'encoding'} > 0)
115 1 9 defined $$opts{'append'} && $$opts{'append'} ? :
26 10 $read ? :
119 0 36 unless open my $IN, $mode . $encoding, $file
127 4 34 if (defined $$opts{'dec'} and $$opts{'dec'} ne '.')
137 42 6 if ($read) { }
4 2 elsif (looks_like_number $col) { }
139 36 6 looks_like_number $tmp ? :
151 9 3 if ($max == min(@l))
165 26 1 if ($toclose)
166 0 26 unless close $fh
170 2 25 if (defined $$opts{'fill'} and $$opts{'fill'})
182 10 1 if (defined $$opts{'fill'} and $$opts{'fill'})
186 10 1 if ($toclose)
187 0 10 unless close $fh
195 0 38 unless my $csv = 'Text::CSV'->new(\%text_csv_opts)
207 4 13 defined $tied_obj ? :
5 17 defined $$opts{$_} ? :
215 3 8 if ($meta{'row_names'})
216 2 1 reftype(\$meta{'row_names'}) eq 'SCALAR' ? :
224 4 7 if ($meta{'col_names'})
225 2 2 reftype(\$meta{'col_names'}) eq 'SCALAR' ? :
230 1 3 if (defined $$opts{'hr'} and $$opts{'hr'})
261 11 101 if not length $line and $$opts{'blank_lines_skip'}
263 0 101 unless $csv->parse($line)
266 33 68 if (scalar @{$data[-1];} > $max_cols)
271 2 99 if $$opts{'nrow'} >= 0 and $. > $$opts{'nrow'}
277 1 26 unless $data[0]
7 20 scalar @{[] unless $data[0];} == $max_cols - 1 ? :
279 6 21 if (defined $$opts{'header'} and not $$opts{'header'})
284 4 19 $auto_col_row ? :
4 23 defined $$opts{'row_names'} && reftype(\$$opts{'row_names'}) eq 'SCALAR' ? :
291 5 22 if ($auto_col_row)
295 21 6 if ($auto_col_row or $$opts{'header'}) { }
307 1 5 if ($$opts{'nrow'} >= 0 and $. > $$opts{'nrow'})
313 8 19 if ($rowname_id >= 0) { }