change build number calculation to be more accurate
[spider.git] / perl / DXDb.pm
index 6ccb9105c3307426b5c430a60fa438c5bda0ec39..6ee8f939de92e235ebd0144350c79c79550fbd47 100644 (file)
@@ -48,6 +48,12 @@ $lastprocesstime = time;
 $nextstream = 0;
 %stream = ();
 
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
 # allocate a new stream for this request
 sub newstream
 {