Condition Coverage

blib/lib/Doit.pm
Criterion Covered Total %
condition 117 233 50.2


and 3 conditions

line !l l&&!r l&&r condition
46 0 0 51 !(($ENV{'TERM'} || '') =~ /^(|dumb)$/) && eval { do { require Term::ANSIColor; 1 } }
259 0 0 0 -f $prog and -x $prog
260 0 0 0 -f "$prog.bat" and -x "$prog.bat"
261 0 0 0 -f "$prog.com" and -x "$prog.com"
262 0 0 0 -f "$prog.exe" and -x "$prog.exe"
263 0 0 0 -f "$prog.cmd" and -x "$prog.cmd"
265 0 0 0 -f $prog and -x $prog
274 0 0 0 -f "$_\\$prog" and -x "$_\\$prog"
275 0 0 0 -f "$_\\$prog.bat" and -x "$_\\$prog.bat"
276 0 0 0 -f "$_\\$prog.com" and -x "$_\\$prog.com"
277 0 0 0 -f "$_\\$prog.exe" and -x "$_\\$prog.exe"
278 0 0 0 -f "$_\\$prog.cmd" and -x "$_\\$prog.cmd"
280 150 0 15 -x "$_/$prog" and not -d "$_/$prog"
335 0 0 0 $text ne "" and not $text =~ /[ \t\n\x0a\x0b\x0c\x0d\x85"]/
342 0 0 0 $i < @text and $text[$i] eq "\\"
466 0 17 17 @args and ref $args[0] eq "HASH"
506 0 10 2 @args and ref $args[0] eq "HASH"
541 2 5 0 $uid != -1 and $s[4] != $uid
5 2 0 $gid != -1 and $s[5] != $gid
591 7 3 1 $if and not &$if()
594 1 7 3 $doit and $unless
8 2 1 $doit and $unless and &$unless()
597 2 4 5 $doit and $creates
6 3 2 $doit and $creates and -e $creates
729 1 13 3 @args and ref $args[0] eq "HASH"
851 0 3 8 @args and ref $args[0] eq "HASH"
874 0 2 1 @args and ref $args[0] eq "HASH"
921 0 2 37 @args and ref $args[0] eq "HASH"
957 0 2 1 @args and ref $args[0] eq "HASH"
976 0 7 141 @args and ref $args[0] eq "HASH"
1004 0 3 134 @args and ref $args[0] eq "HASH"
1091 0 96 47 @args and ref $args[0] eq "HASH"
1118 0 2 0 @args and ref $args[0] eq "HASH"
1254 1 21 15 @args and ref $args[0] eq "HASH"
1331 1 43 3 @args and ref $args[0] eq "HASH"
1334 45 2 0 $check and ref $check ne "CODE"
1569 37 0 0 $^O eq "MSWin32" and $diff_cmd[0] eq "fc"
1577 0 0 37 not $cannot_use_dash and eval { do { require IPC::Run; 1 } }
1902 0 0 0 $fast_tries and eval { do { require Time::HiRes; 1 } }
1907 0 0 0 $try <= $fast_tries && defined &Time::HiRes::sleep
1943 0 9 2 defined $rettype and $rettype eq "e"
0 0 9 defined $rettype and $rettype eq "r"
1995 0 0 0 not $self->{'excl'} and -e $sockpath
2235 4 0 1 defined $umask and not $umask =~ /^\d+$/

or 2 conditions

line l !l condition
88 0 58 delete $opts{'__level'} || 'auto'
270 21 0 $Config::Config{'path_sep'} || ':'
290 5 5 delete $opts{'file'} || '/etc/os-release'
291 1 9 delete $opts{'refresh'} || 0
1255 13 24 delete $options{'quiet'} || 0
1364 4 6 defined $_->{'add_after'} || 0
2 8 defined $_->{'add_after_first'} || 0
2 8 defined $_->{'add_before'} || 0
2 8 defined $_->{'add_before_last'} || 0
1889 0 0 delete $opts{'code'} || die('code is mandatory')
1890 0 0 delete $opts{'tries'} || 20
1892 0 0 delete $opts{'slow_sleep'} || 1
1893 0 0 delete $opts{'fast_sleep'} || 0.1
2230 1 5 delete $opts{'put_to_remote'} || 'rsync_put'
2233 0 5 delete $opts{'perl'} || 'perl'
2263 0 0 $bootstrap || ''

or 3 conditions

line l !l&&r !l&&!r condition
183 2 0 102 not defined $pwd or $pwd eq ""
293 1 6 2 $refresh or not $cached_os_release_per_file{$file}
370 0 0 0 $char eq "'" or $char eq "\""
0 0 0 $char eq "<" or $char eq ">"
0 0 0 $char eq "<" or $char eq ">" or $char eq "|"
418 0 44 0 $self->{'runner'} ||= "Doit::Runner"->new($self)
424 0 7 0 $self->{'dryrunner'} ||= "Doit::Runner"->new($self, "dryrun", 1)
537 7 2 1 $uid != -1 or $gid != -1
744 7 4 4 not -e $real_to or do { require File::Compare; File::Compare::compare($from, $real_to) != 0 }
859 0 1 2 $quiet || $info
940 0 1 3 $quiet || $info
988 19 1 2 $quiet || $info
1051 1 1 1 not defined $ENV{$key} or $ENV{$key} ne $val
1168 24 1 3 -e $file or -l $file
1202 0 1 0 $now ||= time
1205 1 0 0 $now ||= time
1212 9 1 0 $s[8] != $atime or $s[9] != $mtime
1355 4 2 20 defined $_->{'add_after'} or defined $_->{'add_after_first'}
6 2 18 defined $_->{'add_after'} or defined $_->{'add_after_first'} or defined $_->{'add_before'}
4 2 16 defined $_->{'add_after'} or defined $_->{'add_after_first'} or defined $_->{'add_before'} or defined $_->{'add_before_last'}
1585 0 0 0 $^O eq "MSWin32" or $cannot_use_dash
1891 0 0 0 delete $opts{'fast_tries'} || int $tries / 2
2134 0 0 0 delete $opts{'perl'} || $^X