Branch Coverage

blib/lib/Authen/Passphrase/MD5Crypt.pm
Criterion Covered Total %
branch 21 34 61.7


line true false branch
138 8 10 if ($attr eq 'salt') { }
1 9 elsif ($attr eq 'salt_random') { }
7 2 elsif ($attr eq 'hash_base64') { }
2 0 elsif ($attr eq 'passphrase') { }
140 0 8 if exists $self->{'salt'}
141 0 8 unless $value =~ /\A[\x00-\xff]*\z/
146 0 1 if exists $self->{'salt'}
151 0 7 if exists $self->{'hash_base64'} or defined $passphrase
153 0 7 unless $value =~ m[\A[./0-9A-Za-z]{21}[./01]\z]
159 0 2 if exists $self->{'hash_base64'} or defined $passphrase
166 0 9 unless exists $self->{'salt'}
167 2 7 if defined $passphrase
169 0 9 unless exists $self->{'hash_base64'}
185 2 0 if ($passwd =~ /\A\$1\$/)
186 0 2 unless $passwd =~ m[\A\$1\$([!-#%-9;-~]{0,8})\$([./0-9A-Za-z]{22})\z]
246 0 28 if $self->{'salt'} =~ /[^\!-\#\%-9\;-\~]/ or length $self->{'salt'} > 8
261 0 10 if $self->{'salt'} =~ /[^\!-\#\%-9\;-\~]/ or length $self->{'salt'} > 8