Branch Coverage

blib/lib/Data/Format/Pretty/Console.pm
Criterion Covered Total %
branch 104 146 71.2


line true false branch
39 0 44 if defined $ENV{'FORMAT_PRETTY_TABLE_COLUMN_ORDERS'}
42 0 44 if defined $ENV{'FORMAT_PRETTY_TABLE_COLUMN_FORMATS'}
45 0 44 if defined $ENV{'FORMAT_PRETTY_TABLE_COLUMN_TYPES'}
56 135 12 if (not ref $data or &blessed($data)) { }
9 3 elsif (ref $data eq 'ARRAY') { }
57 8 127 unless (defined $data)
58 8 0 if $is_format
61 0 127 if (length $data > $maxlen)
64 42 85 if $is_format
67 0 21 if ref $_
0 9 if (grep {not &blessed($_) if ref $_;} @$data)
70 21 0 defined $_ ? :
71 0 9 if (length $s > $maxlen)
74 3 6 if $is_format
98 27 45 if (not ref $data or &blessed($data))
106 24 21 if (ref $data eq 'ARRAY')
109 17 10 unless ref $row eq 'ARRAY'
110 2 8 if defined $numcols and $numcols != @$row
111 0 8 if grep {not $self->_is_cell($_);} @$row
121 19 21 if (ref $data eq 'ARRAY')
124 7 20 unless ref $row eq 'HASH'
126 0 47 unless $self->_is_cell($row->{$k})
138 7 21 if (ref $data eq 'ARRAY')
140 0 16 unless $self->_is_cell($_)
150 0 21 if $self->{'opts'}{'skip_hot'}
151 0 21 unless ref $data eq 'HASH'
155 0 24 unless $s2
156 9 15 if $s2 =~ /^(?:list|aoa|aoh|hash)$/
158 14 7 unless $has_t
166 14 0 if (ref $data eq 'HASH')
168 3 10 unless $self->_is_cell($_)
189 2 10 if ($tcff)
194 0 3 unless ($scol ~~ \@tcols)
196 2 0 if ($match)
205 0 12 if ($tctt)
210 0 0 unless ($scol ~~ \@tcols)
212 0 0 if ($match)
223 7 5 if ($t->{'at_opts'})
226 2 10 if ($colfmts)
230 0 12 if ($coltypes)
234 0 12 if ($t->{'col_widths'})
250 7 1 defined $data ? :
251 2 6 unless length $sdata
252 2 4 $sdata =~ /\n\z/s ? :
257 3 0 if ($self->{'opts'}{'interactive'}) { }
268 0 3 if ($ENV{'COLUMNS'}) { }
3 0 elsif (eval { do { require Term::Size; 1 } }) { }
275 0 0 $^O =~ /Win/ ? :
278 3 0 if ($maxwidth)
286 0 3 if $numcols > @rows
287 3 0 if $numcols < 1
291 0 3 if defined $self->{'opts'}{'list_max_columns'} and $numcols > $self->{'opts'}{'list_max_columns'}
293 3 0 if ($numrows)
301 0 3 if ($numcols > 1)
308 7 0 $idx < @rows ? :
327 3 0 if ($self->{'opts'}{'interactive'}) { }
346 2 1 if ($self->{'opts'}{'interactive'}) { }
347 1 1 if (@$data) { }
374 5 1 if ($self->{'opts'}{'interactive'}) { }
413 2 25 if (not $struct) { }
8 17 elsif ($struct eq 'scalar') { }
3 14 elsif ($struct eq 'list') { }
3 11 elsif ($struct eq 'hash') { }
3 8 elsif ($struct eq 'aoa') { }
6 2 elsif ($struct eq 'aoh') { }
2 0 elsif ($struct eq 'hot') { }
439 2 4 if ($tco)
440 0 2 unless ref $tco eq 'ARRAY'
444 0 2 unless ref $co eq 'ARRAY'
447 1 6 unless $_ ~~ \@$cols
460 1 5 if ($found) { }
463 1 9 defined $orders{$a} && defined $orders{$b} ? :
0 1 unless defined $orders{$a} && defined $orders{$b} ? $orders{$a} <=> $orders{$b} : 0