Branch Coverage

blib/lib/Digest/Bcrypt.pm
Criterion Covered Total %
branch 38 42 90.4


line true false branch
30 0 2 unless my $clone = $self->new("cost", $self->cost, "salt", $self->salt, "type", $self->type)
41 70 44 unless @_
46 2 42 unless (defined $cost)
62 0 14 defined $self->{'type'} ? :
73 11 28 unless @_
74 12 16 @_ > 1 ? :
75 14 10 if $params->{'cost'}
76 14 10 if $params->{'salt'}
77 8 16 if $params->{'settings'}
78 0 24 if $params->{'type'}
93 90 42 unless @_
98 2 40 unless (defined $salt)
111 20 11 unless (@_)
115 8 12 defined $self->{'type'} ? :
119 3 8 unless $settings =~ m[\A\$(2[abxy])\$([0-9]{2})\$ ([./A-Za-z0-9]{22})]x
131 2 8 unless @_
134 0 8 unless $type =~ /^2[abxy]$/
142 42 16 defined $cost ? :
143 2 56 if (not defined $cost && $cost =~ /^\d+$/)
151 40 15 defined $salt ? :
152 3 52 unless ($salt and &bytes::length($salt) == 16)