# #
# File: shared/Id.pm #
# #
-# Authors: André Malo <nd@o3media.de>, 2001-05-03 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: compose an unique ID (in CGI context) #
# #
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'}
################################################################################
#
#
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));