Branch Coverage

blib/lib/Redis/DistLock.pm
Criterion Covered Total %
branch 20 38 52.6


line true false branch
38 0 11 unless $$self{'locks'}
11 0 if @{[] unless $$self{'locks'};} == 0
47 0 12 @_ == 1 && ref $_[0] ? :
51 3 9 exists $args{'version_check'} ? :
59 2 10 exists $args{'logger'} ? :
68 18 0 ref $server ? :
70 0 18 unless ($redis)
76 15 3 if ($version_check)
79 0 13 unless $info and $$info{'redis_version'} and $$info{'redis_version'} =~ /\A ([0-9]+) \. ([0-9]+) \. ([0-9]+) \z/x and $1 > 2 || $1 == 2 && $2 > 6 || $1 == 2 && $2 == 6 && $3 >= 12
95 0 17 if ($sha1 ne RELEASE_SHA1)
101 0 17 if ($sha1 ne EXTEND_SHA1)
106 0 11 if (@servers < $quorum)
131 2 0 unless defined $value
140 0 6 eval { do { !$extend ? $redis->set($resource, $value, 'NX', 'PX', $ttl * 1000) : $redis->evalsha(EXTEND_SHA1, 1, $resource, $value, $ttl * 1000) } } ? :
141 6 0 !$extend ? :
146 6 0 if $@
153 0 6 if ($ok >= $$self{'quorum'} and $validity > 0)
161 0 0 if $$self{'auto_release'}
176 0 0 @_ == 1 && ref $_[0] ? :