Branch Coverage

blib/lib/Tie/CSV_File.pm
Criterion Covered Total %
branch 38 44 86.3


line true false branch
88 1 109 unless (defined $options{'sep_char'})
94 3 107 unless ((my $l = length $options{'sep_char'}) == 1)
98 10 100 if (defined(my $c = $options{'sep_char'}) and defined(my $r = $options{'sep_re'}))
99 2 8 unless $c =~ /$r/
103 1 109 unless tie my @lines, 'Tie::File', $fname
109 100 9 unless (defined $csv_xs_options{'eol'})
113 0 109 unless (defined $csv_xs)
149 199 30 if (@$columns) { }
150 0 199 unless $csv->combine(@$columns)
197 50 1145 unless defined $line
198 61 1084 if (defined(my $eol = $self->{'eol'})) { }
203 194 951 if (length $line == 0)
206 50 901 if (defined(my $re = $self->{'sep_re'})) { }
208 182 0 defined $_ ? :
212 9 41 if $line =~ /$re$/
216 901 0 if $csv->parse($line)
226 1 179 if (@$fields == 0) { }
21 158 elsif (@$fields == 1 and $fields->[0] eq '') { }
228 0 1 defined $eol ? :
233 20 22 defined $_ ? :
238 0 158 unless $csv->combine(@$fields)
246 933 3125 unless $self->{'fields'}