fixed a problem where id generator could generate hex and binary looking patterns
This commit is contained in:
parent
816c96a284
commit
988975abea
1 changed files with 3 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ sub generate {
|
|||
my $id = Digest::MD5::md5_base64($v);
|
||||
$id =~ s/\+/_/g;
|
||||
$id =~ s/\//-/g;
|
||||
if ($id =~ /^0/) { # Can't start with 0 because that can cause problems with 0x (hex) and 0b (bin) in perl
|
||||
$id = $self->generate();
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue