Skip Menu |

This queue is for tickets about the Data-Uniqid CPAN distribution.

Report information
The Basics
Id: 49368
Status: new
Priority: 0/
Queue: Data-Uniqid

People
Owner: Nobody in particular
Requestors: Bernard.Merindol [...] xao-consultant.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in suniqid
Date: Wed, 2 Sep 2009 17:04:06 +0200
To: bug-Data-Uniqid [...] rt.cpan.org
From: "Bernard Merindol(XAO)" <Bernard.Merindol [...] xao-consultant.fr>
Hi, When use suniqid in cetain time the retun is empty see the degug line: main::suniqid(toto.pl:27): my($s,$us)=gettimeofday(); DB<2> s main::suniqid(toto.pl:28): my($v)=sprintf("%06d%5d%06d", $us,substr($s,-5),$$); DB<2> print $s; 1251903295 DB<3> print $us; 289225 DB<4> s main::suniqid(toto.pl:29): return(&base62($v)); DB<4> print $v; 289225 3295024868 DB<5> q if $s have 0 in position five , in my example 1251903295 %5d return space3295 if change my($v)=sprintf("%06d%5d%06d",$us,substr($s,-5),$$); by my($v)=sprintf("%06d%05d%06d",$us,substr($s,-5),$$); is works main::suniqid(toto.pl:27): my($s,$us)=gettimeofday(); DB<1> s main::suniqid(toto.pl:28): my($v)=sprintf("%06d%05d%06d", $us,substr($s,-5),$$); DB<1> s main::suniqid(toto.pl:29): return(&base62($v)); DB<1> print $v; 50806203490025203 Thank and best regards Bernard Merindol Show quoted text
_____________________________________________________ Consultant ToIP et réseaux, Mobile:+33.6.08.75.03.52