fixed a problem where id generator could generate hex and binary looking patterns

This commit is contained in:
JT Smith 2006-05-02 23:32:52 +00:00
parent 816c96a284
commit 988975abea

View file

@ -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;
}