Condition Coverage

lib/Rex/Commands.pm
Criterion Covered Total %
condition 46 117 39.3


and 3 conditions

line !l l&&!r l&&r condition
304 174 6 32 $class ne "main" and $class ne "Rex::CLI"
322 24 0 188 not $class->can($task_name_save) and $task_name_save =~ /^[a-zA-Z_][a-zA-Z0-9_]+$/u
332 8 0 4 scalar @_ == 1 and ref $_[0] eq "HASH"
8 0 0 $REGISTER_SUB_HASH_PARAMETER and scalar @_ % 2 == 0
427 1 15 0 scalar @params <= 7 and defined $params[1] ? grep({$params[1] eq $_;} "ensure", "system", "gid") : 0
15 0 0 scalar @params <= 7 and defined $params[1] ? grep({$params[1] eq $_;} "ensure", "system", "gid") : 0 and defined $params[3] ? grep({$params[3] eq $_;} "ensure", "system", "gid") : 1
0 0 0 scalar @params <= 7 and defined $params[1] ? grep({$params[1] eq $_;} "ensure", "system", "gid") : 0 and defined $params[3] ? grep({$params[3] eq $_;} "ensure", "system", "gid") : 1 and defined $params[5] ? grep({$params[5] eq $_;} "ensure", "system", "gid") : 1
566 0 6 0 not ref $_[0] and $_[0] eq "fallback"
1072 2 6 4 @args and grep /^\Q$task_name\E$/u, @args
1094 0 46 56 $caller_pkg and $caller_pkg eq 'Rex::CLI' || $caller_pkg eq 'main'
1549 0 0 1 $str and $str eq '-on' || $str eq 'on'
0 0 0 $str and $str eq '-off' || $str eq 'off'
1629 1 4 3 exists $option->{'default'} and not $to_return
1682 0 0 0 $depth == 0 and exists $option->{'no_root'}
0 0 0 $depth == 0 and exists $option->{'no_root'} and $option->{'no_root'}
1698 0 0 0 $depth == 0 and exists $option->{'no_root'}
0 0 0 $depth == 0 and exists $option->{'no_root'} and $option->{'no_root'}
1706 0 0 0 $depth == 0 and exists $option->{'no_root'}
0 0 0 $depth == 0 and exists $option->{'no_root'} and $option->{'no_root'}
1719 0 0 0 $depth == 0 and exists $option->{'no_root'}
0 0 0 $depth == 0 and exists $option->{'no_root'} and $option->{'no_root'}
1726 0 0 0 $depth == 1 and exists $option->{'no_root'}
0 0 0 $depth == 1 and exists $option->{'no_root'} and $option->{'no_root'}

or 2 conditions

line l !l condition
705 0 5 $params ||= {"Rex::Args"->get}
709 5 0 $params ||= {}
1175 0 0 $Rex::Commands::current_desc || ''
1189 0 225 'Rex::Config'->get_environment || 'default'
1546 1 0 $type ||= "Base"
1811 13 11 $end ||= ""
1812 3 21 $step ||= 1
1833 4 1 $end ||= ""
1854 0 0 $_[0] || 0

or 3 conditions

line l !l&&r !l&&!r condition
281 212 0 0 $task_name =~ /^[a-zA-Z_][a-zA-Z0-9_]*$/u or "Rex::Config"->get_disable_taskname_warning
319 1 1 210 $options->{'dont_register'} ||= $Rex::Commands::dont_register_tasks
346 2 0 210 $options->{'dont_register'} ||= $Rex::Commands::dont_register_tasks
958 0 0 0 $_[0] eq "-nolog" or $_[0] eq "nolog"
1034 3 1 1 @args or @maybe_tasks_to_run
1094 2 54 46 $caller_pkg eq 'Rex::CLI' || $caller_pkg eq 'main'
1528 2354 26 0 $Rex::Commands::profiler || 'Rex::Profiler'->new
1549 1 0 0 $str eq '-on' || $str eq 'on'
0 0 0 $str eq '-off' || $str eq 'off'
1905 0 0 0 not defined $format or $format eq "default"