Branch Coverage

blib/lib/Text/CSV/Track.pm
Criterion Covered Total %
branch 108 124 87.1


line true false branch
59 48 14 unless defined $self->{'header_lines'}
60 56 6 unless defined $self->{'footer_lines'}
74 4 1553 if @fields == 1 and not defined $fields[0]
77 6 1547 if $self->single_column
80 1553 0 if (defined $self->replace_new_lines_with)
83 2 1556 unless defined $field
91 1549 4 if ($type eq 'csv') { }
4 0 elsif ($type eq 'xml') { }
92 1 1548 unless $self->_csv_format->combine(@fields)
101 0 4 unless defined $col_value
129 2733 4215 if (@_ >= 1)
135 0 6948 unless $identificator
141 4215 2733 unless $is_set
145 2733 4214 if ($is_set) { }
150 2572 1642 unless defined $rh_value_of->{$identificator}
153 21 1621 if (@{$rh_value_of->{$identificator};} > 1) { }
169 0 8 unless defined $self->hash_names
175 3 5 if (@_ >= 1)
179 0 3 if ref $rh ne "HASH"
182 3 5 if ($is_set) { }
186 1 5 if $index == -1
225 36 0 unless ($full_time_lock)
226 0 36 unless open $file_fh, "+>>", $file_name
229 0 36 unless flock $file_fh, 2
236 4 1552 if (defined $store_as_xml) { }
244 4 1551 unless $file_line
250 0 35 unless truncate $file_fh, 0
275 4299 62 if $self->_lazy_init
281 61 1 unless exists $self->{'replace_new_lines_with'}
282 61 1 unless exists $self->{'binary'}
283 61 1 unless exists $self->{'identificator_column_number'}
296 50 12 if (ref $self->{'header_lines'} eq 'ARRAY') { }
307 56 6 if (ref $self->{'footer_lines'} eq 'ARRAY') { }
319 1 61 defined $self->sep_char ? :
320 1 61 defined $self->escape_char ? :
321 1 61 defined $self->quote_char ? :
326 3 59 unless $file_name
341 3 56 if ($full_time_lock)
342 0 3 if ($ignore_missing_file) { }
352 7 52 unless (open $file_fh, $open_mode, $file_name)
353 6 1 if ($ignore_missing_file) { }
363 3 49 if ($full_time_lock) { }
0 49 elsif ($_no_lock) { }
364 0 3 unless flock $file_fh, 2
372 0 49 unless flock $file_fh, 1
392 33 2592 if ($header_lines_count)
394 30 3 if $header_lines_from_file
403 15 2577 if ($lines_count < $footer_lines_count)
405 15 0 if $footer_lines_from_file
411 10 2567 if $self->trunc
414 3 2564 unless ($self->_csv_format->parse($line))
418 1 2 unless $self->ignore_badly_formated
431 6 2558 if $self->single_column
440 6 2558 if $identificator_exist{$identificator}
444 3 48 if ($full_time_lock) { }
449 48 0 unless $_no_lock
472 12 118 if (@_ >= 1) { }
478 3 115 if ref $self->{'header_lines'} ne "ARRAY"
490 9 110 if (@_ >= 1) { }
496 2 108 if ref $self->{'footer_lines'} ne "ARRAY"
507 1 61 if $self->auto_store
512 3 59 if (defined $file_fh)