Branch Coverage

blib/lib/Digest/Bcrypt.pm
Criterion Covered Total %
branch 35 38 92.1


line true false branch
29 0 2 unless my $clone = $self->new("cost", $self->cost, "salt", $self->salt, "type", $self->type)
40 66 45 unless @_
45 2 43 unless (defined $cost)
72 11 28 unless @_
73 12 16 @_ > 1 ? :
74 14 10 if $params->{'cost'}
75 14 10 if $params->{'salt'}
76 8 16 if $params->{'settings'}
77 0 24 if $params->{'type'}
92 86 40 unless @_
97 2 38 unless (defined $salt)
110 20 11 unless (@_)
118 2 9 unless $settings =~ m[\A\$(2[abxy])\$([0-9]{2})\$ ([./A-Za-z0-9]{22})]x
130 2 9 unless @_
133 0 9 unless $type =~ /^2[abxy]$/
141 43 14 defined $cost ? :
142 5 52 if (not defined $cost && $cost =~ /^\d+$/ or ($cost < 5 or $cost > 31))
150 38 13 defined $salt ? :
151 3 48 unless ($salt and &bytes::length($salt) == 16)