From ddbd989fcfdfd5ae8f925df32336b7e3a0365a1b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 19 May 2010 14:01:44 +0000 Subject: [PATCH] -Forgot what programming language I was tping in for a minute there... Fix it to perl again git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6170 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index a2261a1d9..68a18f873 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -79,24 +79,25 @@ sub genUUID $uuidtime->bmuladd('10000000',$usec*10); $uuidtime->badd('0x01B21DD213814000'); my $timelow=$uuidtime->copy(); - $timelow.band('0xffffffff');# get lower 32bit + $timelow->band('0xffffffff');# get lower 32bit my $timemid=$uuidtime->copy(); - $timemid.band('0xffff00000000'); + $timemid->band('0xffff00000000'); my $timehigh=$uuidtime->copy(); - $timehigh.band('0xffff000000000000'); - $timemid.brsft(32); - $timehigh.brsft(48); - $timehigh.bior('0x1000'); #add in version, don't bother stripping out the high bits since by the year 5236, none of this should matter + $timehigh->band('0xffff000000000000'); + $timemid->brsft(32); + $timehigh->brsft(48); + $timehigh->bior('0x1000'); #add in version, don't bother stripping out the high bits since by the year 5236, none of this should matter my $clockseq=rand(8191); #leave the top three bits alone. We could leave just top two bits, but it's unneeded #also, randomness matters very little, as the time+mac is here $clockseq = $clockseq | 0x8000; #RFC4122 variant #time to assemble... $timelow = $timelow->bstr(); - $timelow == 0; # doing numeric comparison induces perl to 'int'-ify it. Safe at this point as the subpieces are all sub-32 bit now + $usec=$timelow == 0; # doing numeric comparison induces perl to 'int'-ify it. Safe at this point as the subpieces are all sub-32 bit now + #assign to $usec the result so that perl doesn't complain about this trickery $timemid = $timemid->bstr(); - $timemid == 0; - $timehigh = $timehigh->bstr() - $timehigh == 0; + $usec=$timemid == 0; + $timehigh = $timehigh->bstr(); + $usec=$timehigh == 0; my $uuid=sprintf("%08x-%04x-%04x-%04x-",$timelow,$timemid,$timehigh,$clockseq); my $mac = $args{mac}; $mac =~ s/://g;