Branch Coverage

blib/lib/Term/Table2.pm
Criterion Covered Total %
branch 106 106 100.0


line true false branch
39 38 1 $@ ? :
197 2 208 if $self->{'end_of_table'} and not @{$self->{':row_lines'};}
199 72 136 unless @{$self->{':row_lines'};} and $self->{':line_on_page'}
201 13 195 if $self->{':line_on_page'} == $self->{':lines_per_page'}
204 69 139 unless @{$self->{':row_lines'};}
242 9 2 ref $self->{'rows'} eq 'ARRAY' ? :
259 133 168 if exists $params{$option}
268 22 142 if $self->{':split_offset'}
272 37 127 if $self->{'broad_row'} == 2 and $line_too_long
274 22 105 if $line_too_long
289 86 203 if (Term::Table2::length($field) > $column_width) { }
291 1 85 $broad_flags->[$column_no] == 0 ? :
309 68 2 if (@row)
319 59 17 if (not @{$self->{':row_lines'};} and @{$self->_get_next_row;})
327 21 55 if ref $self->{'rows'} eq 'ARRAY' && $self->{'current_row'} == 1 || !$self->{':line_on_page'} and not $self->{'end_of_table'}
329 15 10 if ($self->{':end_of_chunk'} || $self->{'separate_rows'} && $self->{':line_on_page'} + @{$self->{':row_lines'};} < $self->{'page_height'} - 1 and not $self->{':separating_added'})
342 12 60 if ($self->{'end_of_table'} or ref $self->{'rows'} eq 'ARRAY' and not $self->_get_next_row_from_array or ref $self->{'rows'} eq 'CODE' and not $self->_get_next_row_from_callback) { }
361 12 57 if ($current_row > $#{$$self{'rows'};})
362 10 2 if ($self->{'broad_row'} != 1 or $self->{':split_offset'} + $self->{'table_width'} >= $self->{':total_width'})
382 3 5 unless (defined $self->{':number_of_columns'})
383 2 1 ref $row eq 'ARRAY' ? :
384 1 2 if ref $row ne 'ARRAY'
388 2 5 unless (defined $row)
395 1 4 if ref $row ne 'ARRAY'
396 1 3 if scalar @$row != $number_of_columns
399 1 4 if ref $row->[$_]
413 10 3 unless ref $self->{'pad'}
418 1 12 if $self->{'table_width'} < 2 + &min(@{$$self{'pad'};})
421 2 31 $self->{'column_width'}[$_] == 0 ? :
426 10 2 if (@{$self->{':header_lines'};})
432 10 2 $self->{'broad_row'} == 2 ? :
440 10 2 if (@{$self->{':header_lines'};})
443 1 9 if $self->{'page_height'} < $page_height
454 1 5 unless _is_int($flag)
461 1 6 unless _is_int($flag)
474 1 1 ref $flag ? :
480 1 11 ref $width ? :
486 1 9 ref $width ? :
504 181 2 unless not defined $_
516 1 1 @{$self->{'header'};} ? :
524 2 67 if $#$row >= $self->{':number_of_columns'}
537 66 55 if (ref {broad_column => {default => [2], optional => 1}, broad_header => {default => [2], optional => 1}, broad_row => {default => 2, optional => 1}, collapse => {default => [0], optional => 1}, column_width => {default => [0], optional => 1}, header => {default => [()], optional => 1}, pad => {default => 1, optional => 1}, page_height => {default => sub { return (GetTerminalSize())[1]; } , optional => 1}, rows => {default => [()], optional => 1}, separate_rows => {default => 0, optional => 1}, table_width => {default => sub { return (GetTerminalSize())[0]; } , optional => 1}}->{$option}{'default'} eq 'ARRAY') { }
539 10 56 defined $self->{$option} && !ref($self->{$option}) ? :
540 44 22 unless ref $self->{$option}
541 22 44 if $option eq 'header' or $option eq 'rows'
546 2 28 ref $default eq 'CODE' ? :
30 25 unless defined $self->{$option}
560 2 30 if ($self->{'collapse'}[$column_no] and not $column_width) { }
570 1 31 if $self->{'broad_row'} == 0 and $table_width >= $self->{'table_width'}
574 2 10 if $table_width == 1
592 9 3 ref $params{'rows'} eq 'ARRAY' ? :
600 8 2 @{$self->{'rows'};} ? :
622 1 10 if exists $params{'header'} and exists $params{'rows'} and @{$params{'header'};} < $self->{':number_of_columns'}