Condition Coverage

blib/lib/Doit.pm
Criterion Covered Total %
condition 101 179 56.4


and 3 conditions

line !l l&&!r l&&r condition
46 0 0 40 !(($ENV{'TERM'} || '') =~ /^(|dumb)$/) && eval { do { require Term::ANSIColor; 1 } }
265 0 0 0 $text ne '' and not $text =~ /[ \t\n\x0a\x0b\x0c\x0d\x85"]/
272 0 0 0 $i < @text and $text[$i] eq '\\'
395 0 17 15 @args and ref $args[0] eq 'HASH'
435 0 10 2 @args and ref $args[0] eq 'HASH'
470 2 5 0 $uid != -1 and $s[4] != $uid
5 2 0 $gid != -1 and $s[5] != $gid
520 5 2 2 $if and not &$if()
523 2 4 3 $doit and $unless
6 2 1 $doit and $unless and &$unless()
526 3 3 3 $doit and $creates
6 2 1 $doit and $creates and -e $creates
658 1 13 3 @args and ref $args[0] eq 'HASH'
772 0 3 8 @args and ref $args[0] eq 'HASH'
806 0 2 1 @args and ref $args[0] eq 'HASH'
813 0 2 34 @args and ref $args[0] eq 'HASH'
882 0 2 1 @args and ref $args[0] eq 'HASH'
901 0 6 125 @args and ref $args[0] eq 'HASH'
929 0 3 118 @args and ref $args[0] eq 'HASH'
1016 0 90 40 @args and ref $args[0] eq 'HASH'
1050 0 1 0 @args and ref $args[0] eq 'HASH'
1177 1 19 12 @args and ref $args[0] eq 'HASH'
1282 1 43 3 @args and ref $args[0] eq 'HASH'
1285 45 2 0 $check and ref $check ne 'CODE'
1784 0 0 0 $fast_tries and eval { do { require Time::HiRes; 1 } }
1789 0 0 0 $try <= $fast_tries && defined &Time::HiRes::sleep
1825 0 5 2 defined $rettype and $rettype eq 'e'
0 0 5 defined $rettype and $rettype eq 'r'
1877 0 0 0 not $self->{'excl'} and -e $sockpath
2117 0 0 0 defined $umask and not $umask =~ /^\d+$/

or 2 conditions

line l !l condition
88 0 54 delete $opts{'__level'} || 'auto'
1178 10 22 delete $options{'quiet'} || 0
1315 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
1771 0 0 delete $opts{'code'} || die('code is mandatory')
1772 0 0 delete $opts{'tries'} || 20
1774 0 0 delete $opts{'slow_sleep'} || 1
1775 0 0 delete $opts{'fast_sleep'} || 0.1
2112 0 0 delete $opts{'put_to_remote'} || 'rsync_put'
2115 0 0 delete $opts{'perl'} || 'perl'
2145 0 0 $bootstrap || ''

or 3 conditions

line l !l&&r !l&&!r condition
183 2 0 91 not defined $pwd or $pwd eq ''
300 0 0 0 $char eq q['] or $char eq '"'
0 0 0 $char eq '<' or $char eq '>'
0 0 0 $char eq '<' or $char eq '>' or $char eq '|'
347 0 29 0 $self->{'runner'} ||= 'Doit::Runner'->new($self)
353 0 7 0 $self->{'dryrunner'} ||= 'Doit::Runner'->new($self, 'dryrun', 1)
466 7 2 1 $uid != -1 or $gid != -1
673 7 4 4 not -e $real_to or do { require File::Compare; File::Compare::compare($from, $real_to) != 0 }
791 0 1 2 $quiet || $info
865 0 1 3 $quiet || $info
913 19 1 2 $quiet || $info
976 1 1 1 not defined $ENV{$key} or $ENV{$key} ne $val
1100 24 1 3 -e $file or -l $file
1134 0 1 0 $now ||= time
1137 1 0 0 $now ||= time
1144 8 1 1 $s[8] != $atime or $s[9] != $mtime
1306 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'}
1773 0 0 0 delete $opts{'fast_tries'} || int $tries / 2
2016 0 0 0 delete $opts{'perl'} || $^X