Branch Coverage

blib/lib/Mnet/Report/Table.pm
Criterion Covered Total %
branch 41 132 31.0


line true false branch
57 1 0 if (not $INC{'Mnet/Log.pm'})
59 1 10 unless (defined $Mnet::Report::Table::error)
65 0 0 unless (defined $Mnet::Report::Table::error)
148 0 11 if $INC{'Mnet/Batch.pm'} and Mnet::Batch::fork_called()
153 1 10 unless $opts->{'columns'}
154 1 9 if ref $opts->{'columns'} ne "ARRAY"
155 1 8 unless scalar @{$opts->{'columns'};}
161 0 15 if $column =~ /["\r\n]/
165 4 11 if $type eq "error"
166 1 14 unless ($type =~ /^(epoch|error|integer|string|time)$/)
213 0 0 if ($self->{'nodefer'}) { }
246 0 6 if ($type eq 'epoch') { }
3 3 elsif ($type eq 'error') { }
2 1 elsif ($type eq 'integer') { }
0 1 elsif ($type eq 'string') { }
1 0 elsif ($type eq 'time') { }
248 0 0 if $INC{'Mnet/Test.pm'}
249 0 0 if exists $data->{$column}
256 1 2 if exists $data->{$column}
260 1 1 if (defined $value)
262 0 1 if ($value =~ /^(\+|\-)?\d+$/) { }
277 0 1 if $INC{'Mnet/Test.pm'}
282 1 0 if exists $data->{$column}
294 0 0 if exists $self->{'_column_types'}{$column}
364 0 0 unless $self->{'_column_error'}
421 0 5 if ($cli->{'test'}) { }
422 0 0 if (defined $row)
431 0 5 if (defined $row)
437 4 1 if (not defined $self->{'output'}) { }
0 1 elsif ($self->{'output'} =~ /^csv(:(.+))?$/) { }
0 1 elsif ($self->{'output'} =~ /^dump(:([a-zA-Z]\w*)(:(.+))?)?$/) { }
0 1 elsif ($self->{'output'} =~ /^json(:([a-zA-Z]\w*)(:(.+))?)?$/) { }
0 1 elsif ($self->{'output'} =~ /^sql(:("([^"]+)"|(\w+))(:(.+))?)?$/) { }
0 1 elsif ($self->{'output'} =~ /^tsv(:(.+))?$/) { }
481 0 4 if ($file and not $self->{'_output_fh'})
483 0 0 if $self->{'append'}
485 0 0 unless open $self->{'_output_fh'}, $mode, $file
492 0 4 if ($output)
493 0 0 if ($row or not $self->{'append'})
559 0 0 unless ($INC{'Mnet/Batch.pm'} and $MNet::Batch::fork_called)
560 0 0 unless ($self->{'append'})
561 0 0 unless defined $row
566 0 0 if ($headings_needed)
576 0 0 if (defined $row)
580 0 0 if ref $row->{$column}
632 0 0 if ref $row->{$column}
690 0 0 unless $INC{'JSON.pm'} or eval "require JSON; 1"
694 0 0 if ref $row->{$column}
721 0 0 if ref $row->{$column}
727 0 0 if length $column > $width
732 0 0 if (defined $row)
790 0 0 if ref $row->{$column}
797 0 0 if (defined $row)
833 0 0 if ref $row->{$column}
839 0 0 if length $column > $width
844 0 0 if (defined $row and $INC{'Mnet/Log.pm'}) { }
0 0 elsif (defined $row) { }
914 0 0 unless ($INC{'Mnet/Batch.pm'} and $MNet::Batch::fork_called)
915 0 0 unless ($self->{'append'})
916 0 0 unless defined $row
921 0 0 if ($headings_needed)
931 0 0 if (defined $row)
935 0 0 if ref $row->{$column}
953 0 1 if $INC{'Mnet/Log.pm'}
956 0 0 if ($self->{'_row_on_error'} and $Mnet::Report::Table::error)
957 0 0 if (not $self->{'_row_on_error'} or $self->{'nodefer'})