Branch Coverage

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


line true false branch
62 0 0 unless $p->getoptionsfromarray(\@argv, $opt, ('redis=s', 'expires=i', 'keep', 'n', 'N', 'x', 'X', 'version'))
73 0 0 if ($opt->{'version'})
77 0 0 if $opt->{'n'}
78 0 0 if $opt->{'x'}
79 0 0 unless defined $opt->{'expires'}
88 0 0 defined $expires ? :
92 0 0 unless my $token = try_get_lock($redis, $opt, $key)
106 0 0 if not defined $key or @command == 0
108 0 0 unless my $redis = connect_to_redis_server($opt)
111 0 0 unless validate_redis_version($redis)
114 0 0 if (my $token = try_get_lock($redis, $opt, $key)) { }
122 0 0 if ($opt->{'exit_code'})
136 0 0 $opt->{'wait'} ? :
153 0 0 if ($major >= 3 or $major == 2 and $minor >= 7 or $major == 2 and $minor == 6 and $rev >= 12)
173 0 0 if ($got_lock) { }
0 0 elsif (not $opt->{'wait'}) { }
182 0 0 if ($WAIT_QUEUE) { }
189 0 0 if $got_lock
194 0 0 if ($opt->{'keep'})
200 0 0 $WAIT_QUEUE ? :
207 0 0 if ($e =~ /NOSCRIPT/) { }
219 0 0 if (my $pid = fork) { }
233 0 0 if ($code == -1) { }
0 0 elsif ($code & 127) { }