Branch Coverage

blib/lib/Net/DAV/Lock.pm
Criterion Covered Total %
branch 37 38 97.3


line true false branch
19 2 80 unless defined $$hash{'path'}
22 1 79 unless defined $$hash{'creator'}
23 1 78 unless $$hash{'creator'} =~ /^[a-z_.][-a-z0-9_.]*$/
25 1 77 unless defined $$hash{'owner'}
28 20 57 if (defined $$hash{'expiry'}) { }
2 55 elsif (defined $$hash{'timeout'}) { }
29 1 19 if $$hash{'expiry'} < $now
30 1 18 if ($$hash{'expiry'} - $now > $MAX_LOCK_TIMEOUT) { }
37 1 1 if ($$hash{'timeout'} > $MAX_LOCK_TIMEOUT) { }
47 24 52 if (defined $$hash{'depth'}) { }
48 1 23 unless $$hash{'depth'} =~ /^(?:0|infinity)$/
54 19 56 if (defined $$hash{'scope'}) { }
55 1 18 unless $$hash{'scope'} eq 'exclusive'
67 2 72 if ($$hash{'uuid'}) { }
3 69 elsif ($$hash{'token'}) { }
68 1 1 unless ($$hash{'uuid'} =~ /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/)
74 2 1 unless ($$hash{'token'} =~ /^opaquelocktoken:[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/)
119 2 0 $left >= 0 ? :
144 1 5 unless $expiry > time