X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/920bb240f2bab1555b7a45cfae4f15d0ddb8df97..f3e4ec2c7444625d5881d373ef0cfa9b405b771b:/selfforum-cgi/shared/Id.pm diff --git a/selfforum-cgi/shared/Id.pm b/selfforum-cgi/shared/Id.pm index 22535a2..4d09143 100644 --- a/selfforum-cgi/shared/Id.pm +++ b/selfforum-cgi/shared/Id.pm @@ -4,7 +4,7 @@ package Id; # # # File: shared/Id.pm # # # -# Authors: André Malo , 2001-05-03 # +# Authors: André Malo # # # # Description: compose an unique ID (in CGI context) # # # @@ -14,14 +14,17 @@ use strict; use vars qw( @table @EXPORT - $VERSION ); ################################################################################ # # Version check # -$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +# last modified: +# $Date$ (GMT) +# by $Author$ +# +sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'} ################################################################################ # @@ -66,6 +69,8 @@ sub unique_id () { # sub to_base64 ($) { my $x = shift; + return '' unless defined $x; + my $y = $table[$x % 64]; $y = $table[$x % 64].$y while ($x = int ($x/64));