Branch Coverage

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


line true false branch
284 48 14 unless defined $$self{'header_lines'}
285 56 6 unless defined $$self{'footer_lines'}
299 4 1553 if @fields == 1 and not defined $fields[0]
302 6 1547 if $self->single_column
305 1553 0 if (defined $self->replace_new_lines_with)
308 2 1556 unless defined $field
316 1549 4 if ($type eq 'csv') { }
4 0 elsif ($type eq 'xml') { }
317 1 1548 unless $self->_csv_format->combine(@fields)
326 0 4 unless defined $col_value
354 2733 4215 if (@_ >= 1)
360 0 6948 unless $identificator
366 4215 2733 unless $is_set
370 2733 4214 if ($is_set) { }
375 2572 1642 unless defined $$rh_value_of{$identificator}
378 21 1621 if (@{$$rh_value_of{$identificator};} > 1) { }
394 0 8 unless defined $self->hash_names
400 3 5 if (@_ >= 1)
404 0 3 if ref $rh ne 'HASH'
407 3 5 if ($is_set) { }
411 1 4 if $index == -1
450 36 0 unless ($full_time_lock)
451 0 36 unless open $file_fh, '+>>', $file_name
454 0 36 unless flock $file_fh, 2
461 4 1552 if (defined $store_as_xml) { }
469 4 1551 unless $file_line
475 0 35 unless truncate $file_fh, 0
500 4299 62 if $self->_lazy_init
506 61 1 unless exists $$self{'replace_new_lines_with'}
507 61 1 unless exists $$self{'binary'}
508 61 1 unless exists $$self{'identificator_column_number'}
521 50 12 if (ref $$self{'header_lines'} eq 'ARRAY') { }
532 56 6 if (ref $$self{'footer_lines'} eq 'ARRAY') { }
544 1 61 defined $self->sep_char ? :
545 1 61 defined $self->escape_char ? :
546 1 61 defined $self->quote_char ? :
551 3 59 unless $file_name
566 3 56 if ($full_time_lock)
567 0 3 if ($ignore_missing_file) { }
577 7 52 unless (open $file_fh, $open_mode, $file_name)
578 6 1 if ($ignore_missing_file) { }
588 3 49 if ($full_time_lock) { }
0 49 elsif ($_no_lock) { }
589 0 3 unless flock $file_fh, 2
597 0 49 unless flock $file_fh, 1
617 33 2592 if ($header_lines_count)
619 30 3 if $header_lines_from_file
628 15 2577 if ($lines_count < $footer_lines_count)
630 15 0 if $footer_lines_from_file
636 10 2567 if $self->trunc
639 3 2564 unless ($self->_csv_format->parse($line))
643 1 2 unless $self->ignore_badly_formated
656 6 2558 if $self->single_column
665 6 2558 if $identificator_exist{$identificator}
669 3 48 if ($full_time_lock) { }
674 48 0 unless $_no_lock
697 12 118 if (@_ >= 1) { }
703 3 115 if ref $$self{'header_lines'} ne 'ARRAY'
715 9 110 if (@_ >= 1) { }
721 2 108 if ref $$self{'footer_lines'} ne 'ARRAY'
732 1 61 if $self->auto_store
737 3 59 if (defined $file_fh)