Branch Coverage

blib/lib/Authen/Passphrase/PHPass.pm
Criterion Covered Total %
branch 33 52 63.4


line true false branch
179 2 31 if ($attr eq 'cost' or $attr eq 'nrounds_log2') { }
9 22 elsif ($attr eq 'cost_base64' or $attr eq 'nrounds_log2_base64') { }
10 12 elsif ($attr eq 'salt') { }
1 11 elsif ($attr eq 'salt_random') { }
1 10 elsif ($attr eq 'hash') { }
8 2 elsif ($attr eq 'hash_base64') { }
2 0 elsif ($attr eq 'passphrase') { }
181 0 2 if exists $self->{'cost'}
182 0 2 unless $value == int $value and $value >= 0 and $value <= 30
189 0 9 if exists $self->{'cost'}
190 0 9 unless $value =~ m[\A[./0-9A-S]\z]
195 0 10 if exists $self->{'salt'}
196 0 10 unless $value =~ /\A[\x00-\xff]{8}\z/
201 0 1 if exists $self->{'salt'}
205 0 1 if exists $self->{'hash'} or defined $passphrase
207 0 1 unless $value =~ /\A[\x00-\xff]{16}\z/
212 0 8 if exists $self->{'hash'} or defined $passphrase
214 0 8 unless $value =~ m[\A[./0-9A-Za-z]{21}[./01]\z]
219 0 2 if exists $self->{'hash'} or defined $passphrase
226 0 11 unless exists $self->{'cost'}
227 0 11 unless exists $self->{'salt'}
228 2 9 if defined $passphrase
229 0 11 unless exists $self->{'hash'}
245 2 0 if ($passwd =~ /\A\$P\$/)
246 0 2 unless $passwd =~ m[\A\$P\$([./0-9A-Za-z])([!-9;-~]{8}) ([./0-9A-Za-z]{22})\z]x
374 0 10 if $self->{'salt'} =~ /[^!-9;-~]/