Branch Coverage

blib/lib/Authen/Passphrase/SaltedDigest.pm
Criterion Covered Total %
branch 49 82 59.7


line true false branch
168 14 28 if ($attr eq 'algorithm') { }
7 21 elsif ($attr eq 'salt') { }
6 15 elsif ($attr eq 'salt_hex') { }
1 14 elsif ($attr eq 'salt_random') { }
6 8 elsif ($attr eq 'hash') { }
6 2 elsif ($attr eq 'hash_hex') { }
2 0 elsif ($attr eq 'passphrase') { }
169 0 14 if exists $$self{'algorithm'}
173 0 7 if exists $$self{'salt'}
175 0 7 unless $value =~ /\A[\x00-\xff]*\z/
179 0 6 if exists $$self{'salt'}
181 0 6 unless $value =~ /\A(?:[0-9A-Fa-f]{2})+\z/
185 0 1 if exists $$self{'salt'}
187 0 1 unless $value == int $value and $value >= 0
191 0 6 if exists $$self{'hash'} or defined $passphrase
194 0 6 unless $value =~ /\A[\x00-\xff]*\z/
198 0 6 if exists $$self{'hash'} or defined $passphrase
201 0 6 unless $value =~ /\A(?:[0-9A-Fa-f]{2})+\z/
205 0 2 if exists $$self{'hash'} or defined $passphrase
213 0 14 unless exists $$self{'algorithm'}
214 0 14 unless exists $$self{'salt'}
215 2 12 if (defined $passphrase) { }
12 0 elsif (exists $$self{'hash'}) { }
218 0 12 unless length $$self{'hash'} == length $self->_hash_of('')
253 0 2 unless $userpassword =~ /\A\{([-0-9A-Za-z]+)\}/
257 0 2 unless defined $meaning
259 0 2 unless $userpassword =~ m[\A\{.*?\} ((?>(?:[A-Za-z0-9+/]{4})*) (?:|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=| [A-Za-z0-9+/][AQgw]==))\z]x
268 0 2 if length $hash_and_salt < $hash_len
270 0 2 if not $salt_allowed and length $hash_and_salt > $hash_len
353 65 0 if (rand $alg) { }
0 0 elsif (rand $alg) { }
354 1 64 if ($alg =~ /::/) { }
355 0 1 unless $alg =~ /\A(?:::)?([0-9a-zA-Z_:]+) (-([0-9][0-9_]*(?:\._*[0-9][0-9_]*)?)?)?\z/x
359 0 1 unless is_valid_module_name $pkgname
361 1 0 if ($load_p)
362 1 0 if (defined $modver) { }
412 12 0 if (rand $alg)
413 1 11 if ($alg =~ /::/) { }
414 1 0 if $alg =~ /\A(?:::)? ([0-9a-zA-Z_:]+)(?:-[0-9._]*)?\z/x
421 0 12 unless defined $scheme
423 0 12 $$self{'salt'} eq '' ? :