Condition Coverage

blib/lib/Doit.pm
Criterion Covered Total %
condition 121 239 50.6


and 3 conditions

line !l l&&!r l&&r condition
48 0 0 53 !(($ENV{'TERM'} || '') =~ /^(|dumb)$/) && eval { do { require Term::ANSIColor; 1 } }
264 0 0 0 -f $prog and -x $prog
265 0 0 0 -f "$prog.bat" and -x "$prog.bat"
266 0 0 0 -f "$prog.com" and -x "$prog.com"
267 0 0 0 -f "$prog.exe" and -x "$prog.exe"
268 0 0 0 -f "$prog.cmd" and -x "$prog.cmd"
270 0 0 0 -f $prog and -x $prog
279 0 0 0 -f "$_\\$prog" and -x "$_\\$prog"
280 0 0 0 -f "$_\\$prog.bat" and -x "$_\\$prog.bat"
281 0 0 0 -f "$_\\$prog.com" and -x "$_\\$prog.com"
282 0 0 0 -f "$_\\$prog.exe" and -x "$_\\$prog.exe"
283 0 0 0 -f "$_\\$prog.cmd" and -x "$_\\$prog.cmd"
285 156 0 16 -x "$_/$prog" and not -d "$_/$prog"
343 0 0 0 $text ne "" and not $text =~ /[ \t\n\x0a\x0b\x0c\x0d\x85"]/
350 0 0 0 $i < @text and $text[$i] eq "\\"
474 0 17 25 @args and ref $args[0] eq "HASH"
514 0 10 2 @args and ref $args[0] eq "HASH"
549 2 5 0 $uid != -1 and $s[4] != $uid
5 2 0 $gid != -1 and $s[5] != $gid
599 7 2 2 $if and not &$if()
602 2 6 3 $doit and $unless
8 2 1 $doit and $unless and &$unless()
605 3 3 5 $doit and $creates
6 3 2 $doit and $creates and -e $creates
734 1 13 3 @args and ref $args[0] eq "HASH"
856 0 3 8 @args and ref $args[0] eq "HASH"
879 0 2 1 @args and ref $args[0] eq "HASH"
926 0 2 37 @args and ref $args[0] eq "HASH"
962 0 2 1 @args and ref $args[0] eq "HASH"
981 0 7 166 @args and ref $args[0] eq "HASH"
1009 0 3 159 @args and ref $args[0] eq "HASH"
1096 0 108 47 @args and ref $args[0] eq "HASH"
1123 0 2 0 @args and ref $args[0] eq "HASH"
1259 1 26 17 @args and ref $args[0] eq "HASH"
1336 1 43 3 @args and ref $args[0] eq "HASH"
1339 45 2 0 $check and ref $check ne "CODE"
1574 42 0 0 $^O eq "MSWin32" and $diff_cmd[0] eq "fc"
1582 0 0 42 not $cannot_use_dash and eval { do { require IPC::Run; 1 } }
1944 0 0 0 $fast_tries and eval { do { require Time::HiRes; 1 } }
1949 0 0 0 $try <= $fast_tries && defined &Time::HiRes::sleep
1987 10 0 1 @args == 1 && $args[0] eq 'exit'
1992 0 9 2 defined $rettype and $rettype eq "e"
0 0 9 defined $rettype and $rettype eq "r"
1995 8 0 1 $ret[0] eq "bye-bye" and $do_exit
2058 0 0 0 not $self->{'excl'} and -e $sockpath
2409 4 0 1 defined $umask and not $umask =~ /^\d+$/

or 2 conditions

line l !l condition
91 0 66 delete $opts{'__level'} || 'auto'
275 22 0 $Config::Config{'path_sep'} || ':'
295 10 5 delete $opts{'file'} || ['/etc/os-release', '/usr/lib/os-release']
296 2 13 delete $opts{'refresh'} || 0
1260 15 29 delete $options{'quiet'} || 0
1369 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
1931 0 0 delete $opts{'code'} || die('code is mandatory')
1932 0 0 delete $opts{'tries'} || 20
1934 0 0 delete $opts{'slow_sleep'} || 1
1935 0 0 delete $opts{'fast_sleep'} || 0.1
2404 1 5 delete $opts{'put_to_remote'} || 'rsync_put'
2407 0 5 delete $opts{'perl'} || 'perl'
2439 0 0 $bootstrap || ''

or 3 conditions

line l !l&&r !l&&!r condition
187 2 0 103 not defined $pwd or $pwd eq ""
299 2 8 5 $refresh or not $cached_os_release_per_file{$candidate_file}
378 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 "|"
426 0 47 0 $self->{'runner'} ||= "Doit::Runner"->new($self)
432 0 7 0 $self->{'dryrunner'} ||= "Doit::Runner"->new($self, "dryrun", 1)
545 7 2 1 $uid != -1 or $gid != -1
749 7 4 4 not -e $real_to or do { require File::Compare; File::Compare::compare($from, $real_to) != 0 }
864 0 1 2 $quiet || $info
945 0 1 3 $quiet || $info
993 26 1 2 $quiet || $info
1056 1 1 1 not defined $ENV{$key} or $ENV{$key} ne $val
1173 27 4 3 -e $file or -l $file
1207 0 1 0 $now ||= time
1210 1 0 0 $now ||= time
1217 9 1 0 $s[8] != $atime or $s[9] != $mtime
1360 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'}
1590 0 0 0 $^O eq "MSWin32" or $cannot_use_dash
1933 0 0 0 delete $opts{'fast_tries'} || int $tries / 2
2223 0 0 0 delete $opts{'perl'} || $^X