Branch Coverage

blib/lib/Sqids.pm
Criterion Covered Total %
branch 48 52 92.3


line true false branch
25 1 69 if length $alphabet != length &encode_utf8($alphabet)
27 1 68 if length $alphabet < bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
30 1 67 if keys %alphabet_hash != length $alphabet
33 2 65 if $min_length < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $min_length > $min_length_limit
41 31385 0 if length $_ >= bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
60 1 110 unless @numbers
63 86 24 if ref $numbers[0] eq "ARRAY"
65 1 109 if &first(sub { $_ < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' ); } , @numbers)
82 1 121 if $increment > $length
111 291 121 if ($_ < @numbers - bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ))
124 48 73 if ($self->min_length > length $id)
137 13 108 if ($self->is_blocked_id($id))
156 1 103 if $id eq ""
157 0 103 unless defined wantarray
161 1 102 if $id =~ /[^$alphabet]/
185 402 0 if (@chunks)
187 30 372 if $chunks[0] eq ""
193 303 69 if (@chunks > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ))
202 16 0 @ret == {sign => '+', value => ['1']} ? :
56 16 wantarray ? :
243 20172 35334 unless length $word <= length $id
244 618 34716 if (length $id <= {sign => '+', value => [3]} or length $word <= {sign => '+', value => [3]}) { }
21871 12845 elsif ($word =~ /\d/) { }
4 12841 elsif ($id =~ /\Q$word\E/) { }
246 5 613 if $id eq $word
249 4 21867 if $id =~ /^\Q$word\E/ or $id =~ /\Q$word\E$/