Branch Coverage

blib/lib/JQuery/DataTables/Request.pm
Criterion Covered Total %
branch 74 94 78.7


line true false branch
141 0 6 unless defined $options{'client_params'}
144 0 6 unless ref $options{'client_params'} eq 'HASH'
150 3 3 if (defined $version and $version eq '1.10') { }
2 1 elsif (defined $version and $version eq '1.9') { }
171 0 6 unless defined $idx_arr
188 6 3 unless defined $idx_arr
190 1 2 if ref $idx_arr ne 'ARRAY'
249 0 3 unless %options
251 1 2 if (defined $options{'by_idx'})
255 2 0 if (my $searches = $options{'by_name'})
258 2 0 if ref $searches ne 'ARRAY'
263 0 2 if (defined $key) { }
264 0 0 if ($$col{$key} eq $search_val)
268 2 0 if ($$col{'name'} eq $search_val or $$col{'data'} eq $search_val)
289 0 5 unless defined $idx
306 2 0 unless defined $ar_idx
308 0 0 unless ref $ar_idx eq 'ARRAY'
335 1 4 unless (ref $self or defined $client_params)
339 2 10 unless $client_params
343 4 1 if (defined $$ref{'draw'} and defined $$ref{'start'} and defined $$ref{'length'})
348 3 0 if (defined $$ref{'sEcho'} and defined $$ref{'iDisplayStart'} and defined $$ref{'iDisplayLength'})
396 6 78 if $_ eq $name
6 22 if (grep {$val =~ /^[0-9]+$/u if $_ eq $name;} keys %{$$vmap{'top'};}) { }
2 20 elsif ($name eq 'sSearch') { }
2 18 elsif ($name eq 'bRegex') { }
14 4 elsif ($name =~ /^(?bSearchable|sSearch|bRegex|bSortable|iSortCol|sSortDir|mDataProp)_(?\d+)$/u) { }
402 0 2 $val eq 'true' ? :
408 10 4 if ($$map[0] eq 'columns') { }
4 0 elsif ($$map[0] eq 'order') { }
409 4 6 if (defined $sub_param2) { }
416 2 4 if ($sub_param1 eq 'data')
453 9 132 if $_ eq $name
9 38 if grep {$val =~ /^[0-9]+$/u if $_ eq $name;} 'draw', 'start', 'length'
455 32 15 if ($name =~ /^(?columns|order)\[(?[0-9]+)\]\[(?[^]]+)\](\[(?[^]]+)\])?$/u) { }
6 9 elsif ($name =~ /^search\[(?regex|value)\]$/u) { }
459 24 8 if ($param eq 'columns') { }
8 0 elsif ($param eq 'order') { }
460 8 16 if (defined $sub_param2) { }
470 3 3 if ($sp eq 'regex') { }
471 1 2 $val eq 'true' ? :
500 34 12 if ($param eq 'columns') { }
12 0 elsif ($param eq 'order') { }
501 12 22 if ($sub1 eq 'orderable' or $sub1 eq 'searchable') { }
6 26 elsif ($sub1 eq 'search' and $sub2 eq 'regex') { }
502 10 2 lc $val eq 'true' ? :
504 1 5 lc $val eq 'true' ? :
507 0 6 if ($sub1 eq 'dir' and lc $val ne 'asc' and lc $val ne 'desc')