Branch Coverage

lib/Rex/Commands/Host.pm
Criterion Covered Total %
branch 10 36 27.7


line true false branch
67 0 0 if (exists $option{'host'})
73 0 0 if (exists $option{'file'})
81 0 0 if ($option{'ensure'} eq 'present') { }
89 0 0 if ($new_md5 ne $old_md5)
90 0 0 if (exists $option{'on_change'} and ref $option{'on_change'} eq "CODE")
118 0 0 unless (defined $data->{'ip'})
128 0 0 if (not @cur_host) { }
131 0 0 if (exists $data->{'aliases'})
138 0 0 if ($data->{'ip'} eq $cur_host[0]{'ip'} and join(" ", @{[] unless $data->{'aliases'};}) eq join(" ", @{$cur_host[0]{'aliases'};}))
139 0 0 unless $data->{'aliases'}
168 0 0 if (get_host($host, {'file', $file})) { }
201 2 0 if (@lines and not ref $lines[0]) { }
205 0 0 if (ref $lines[0] eq "HASH")
216 1 7 if ($item->{'host'} eq $hostname) { }
220 1 6 if grep {$_ eq $hostname;} @{$$item{"aliases"};}
234 4 20 if $line =~ /^#/u
235 4 16 unless $line
236 0 16 if $line =~ /^\s*$/u