Branch Coverage

blib/lib/RapidApp/Module/Tree.pm
Criterion Covered Total %
branch 38 108 35.1


line true false branch
36 0 4 jstrue($self->use_contextmenu) ? :
0 4 jstrue($self->no_dragdrop_menu) ? :
0 4 jstrue($self->setup_tbar) ? :
4 0 jstrue($self->no_recursive_delete) ? :
4 0 jstrue($self->no_recursive_copy) ? :
0 4 jstrue($self->double_tree) ? :
4 0 jstrue($self->ddAppendOnly) ? :
53 0 4 if $self->extra_node_actions
63 0 4 if $self->can('fetch_node')
65 0 4 if ($self->op_available('add_node'))
70 0 4 if ($self->op_available('delete_node'))
75 0 4 if ($self->op_available('rename_node'))
80 0 4 if ($self->op_available('copy_node'))
85 0 4 if ($self->op_available('move_node'))
90 0 4 if ($self->op_available('expand_node'))
157 0 11 $self->show_root_node ? :
165 10 1 unless my $node = $self->init_jump_to_node
181 0 11 if $self->show_root_node
182 1 10 if $self->c->req->params->{'node'}
232 0 1 unless exists $n->{'id'}
235 0 1 if $n->{'id'} eq $node
240 1 0 unless $n->{'id'} =~ /^\Q$node\E/
245 1 0 unless exists $n->{'cls'}
248 0 1 if $n->{'expand'} and not exists $n->{'expanded'}
250 0 1 if exists $n->{'allowChildren'} and not jstrue($n->{'allowChildren'})
252 0 1 if jstrue($n->{'leaf'}) and not exists $n->{'loaded'}
271 0 1 if scalar @node_pth > $self->max_node_path_depth
278 0 1 if $DEEP_FETCH_DEPTH > $self->max_recursive_fetch_depth
290 1 0 if $self->role_checker
292 0 1 unless not $_->{'require_role'}
295 0 1 unless ref $nodes eq 'ARRAY'
302 0 1 if $n->{'id'} and $seen_id{$n->{'id'}}++
313 0 1 if (jstrue($n->{'leaf'}) or exists $n->{'allowChildren'} and not jstrue($n->{'allowChildren'}))
314 0 0 unless exists $n->{'loaded'}
318 1 0 if ($parent)
319 0 1 unless $self->apply_path_specific_node_opts($parent, $n)
329 0 0 if $self->fetch_nodes_deep || jstrue($n->{'expanded'}) and not exists $n->{'children'} and not jstrue($n->{'loaded'}) and $DEEP_FETCH_DEPTH < $self->max_recursive_fetch_depth
332 0 1 if ($recurse)
334 0 0 if (@$children > 0) { }
336 0 0 if $self->default_expanded and not exists $n->{'expanded'}
340 0 0 unless exists $n->{'loaded'}
367 0 0 if ($data->{'child'})
369 0 0 unless exists $n->{'id'}
399 0 0 unless defined $node
400 0 0 unless defined $expanded
403 0 0 if (ref $node eq 'ARRAY' or ref $expanded eq 'ARRAY')
404 0 0 unless ref $node eq 'ARRAY' and ref $expanded eq 'ARRAY' and scalar @$node == scalar @$expanded
427 0 0 if $expanded eq '0' or $expanded eq 'false'
429 0 0 $expanded ? :
0 0 if $self->expand_node($node, $expanded ? 1 : 0)
454 0 0 unless ref $data eq 'HASH' and $data->{'child'}
457 0 0 if ($data->{'child'})
459 0 0 unless exists $n->{'id'}
488 0 0 if $self->move_node($node, $target, $point, $point_node)