Branch Coverage

blib/lib/Redis/Setlock.pm
Criterion Covered Total %
branch 0 52 0.0


line true false branch
63 0 0 unless $p->getoptionsfromarray(\@argv, $opt, ('redis=s', 'expires=i', 'keep', 'n', 'N', 'x', 'X', 'version'))
74 0 0 if ($opt->{'version'})
78 0 0 if $opt->{'n'}
79 0 0 if $opt->{'x'}
80 0 0 unless defined $opt->{'expires'}
89 0 0 defined $expires ? :
94 0 0 unless my $token = try_get_lock($redis, $opt, $key)
99 0 0 if ($opt->{'expires'} < $elapsed) { }
0 0 elsif (0 < $WARN_LOCK_TIME_THRESHOLD and $WARN_LOCK_TIME_THRESHOLD < $elapsed) { }
115 0 0 if not defined $key or @command == 0
117 0 0 unless my $redis = connect_to_redis_server($opt)
120 0 0 unless validate_redis_version($redis)
123 0 0 if (my $token = try_get_lock($redis, $opt, $key)) { }
131 0 0 if ($opt->{'exit_code'})
145 0 0 $opt->{'wait'} ? :
162 0 0 if ($major >= 3 or $major == 2 and $minor >= 7 or $major == 2 and $minor == 6 and $rev >= 12)
182 0 0 if ($got_lock) { }
0 0 elsif (not $opt->{'wait'}) { }
191 0 0 if ($WAIT_QUEUE) { }
198 0 0 if $got_lock
203 0 0 if ($opt->{'keep'})
209 0 0 $WAIT_QUEUE ? :
216 0 0 if ($e =~ /NOSCRIPT/) { }
228 0 0 if (my $pid = fork) { }
242 0 0 if ($code == -1) { }
0 0 elsif ($code & 127) { }