Branch Coverage

blib/lib/Mojolicious/Plugin/Tables/Controller/Tables.pm
Criterion Covered Total %
branch 10 76 13.1


line true false branch
12 6 0 if ($c->allowed($user_id, 'tables'))
22 0 0 if ($c->stash('format') || 'x') eq 'json'
33 0 2 if $c->param('start_with')
54 4 0 if (my $row = $rs->find(@ids))
70 0 0 if (($c->stash('format') || 'html') eq 'html')
100 0 0 if ($search_v)
104 0 0 if $info->{'fkey'}
105 0 0 unless $info->{'data_type'} eq 'varchar'
112 0 0 if @order_bys
115 0 0 if $length > 0
127 0 0 if ($info->{'fkey'})
129 0 0 if (my $frow = $row->$_)
146 0 0 if (($c->stash('format') || 'data') eq 'json')
169 0 0 if $hits
188 0 0 if ($row) { }
191 0 0 if (defined(my $val = $c->param($col))) { }
0 0 elsif ($c->param("${col}_pre_checkbox")) { }
192 0 0 if $val eq '' and $info->{'is_nullable'}
195 0 0 $info->{'is_nullable'} ? :
206 0 0 if (defined(my $val = $c->param($col)))
207 0 0 if $val eq '' and $info->{'is_nullable'}
211 0 0 if (eval { do { $row->insert } }) { }
220 0 0 if (my $psource = $c->param('psource') and my $child = $c->param('child') and my $parent_id = $c->param('parent_id')) { }
248 0 1 unless $has_many->{$children}
252 0 1 if ($offset > 0) { }
0 1 elsif ($offset == -1) { }
0 1 elsif ($offset == -2) { }
260 1 0 if $limit
263 0 1 if $dir eq 'desc'
264 1 0 if (($c->stash('format') || 'html') eq 'json')
281 0 0 unless $to =~ /start|end|next|prev/u
282 0 0 if @$pkeys > 1
287 0 0 if (/next/u)
288 0 0 if (/prev/u)
289 0 0 if (/start/u)
290 0 0 if (/end/u)
294 0 0 if $rhs
295 0 0 if (my $hit = $rs->search($where, $attrs)->first)