From ad7e69f78ee4c0593e1d7576a7c1fd3b13931f84 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 8 Jan 2007 10:46:29 +0000 Subject: [PATCH] add dxver to these routines --- perl/DXChannel.pm | 6 ++---- perl/DXCommandmode.pm | 5 +---- perl/DXLog.pm | 5 +---- perl/DXProtHandle.pm | 3 +++ perl/DXProtout.pm | 5 +---- perl/Msg.pm | 7 +++---- perl/Route/Node.pm | 6 ++---- perl/Route/User.pm | 6 ++---- perl/cluster.pl | 7 ++----- 9 files changed, 17 insertions(+), 33 deletions(-) diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index bf419cec..99ae22a9 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -124,11 +124,9 @@ $count = 0; inqueue => '9,Input Queue,parray', ); + use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); # object destruction sub DESTROY diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 3701c085..6fbe9048 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -55,10 +55,7 @@ $cmdimportdir = "$main::root/cmd_import"; # the base directory for importing com # use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); # # obtain a new connection this is derived from dxchannel diff --git a/perl/DXLog.pm b/perl/DXLog.pm index 07038433..44abd5b6 100644 --- a/perl/DXLog.pm +++ b/perl/DXLog.pm @@ -39,10 +39,7 @@ use Carp; use strict; use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); use vars qw($log); diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index e961b02b..df2957a1 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -37,6 +37,9 @@ use RouteDB; use strict; +use vars qw($VERSION $BRANCH); +($VERSION, $BRANCH) = dxver(q$Revision$); + use vars qw($pc11_max_age $pc23_max_age $last_pc50 $eph_restime $eph_info_restime $eph_pc34_restime $last_hour $last10 %eph %pings %rcmds $ann_to_talk $pingint $obscount %pc19list $chatdupeage $chatimportfn diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 6b06fb13..3904c772 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -20,10 +20,7 @@ use DXDebug; use strict; use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); use vars qw($sentencelth); diff --git a/perl/Msg.pm b/perl/Msg.pm index e13be8f3..5ac71b42 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -12,11 +12,10 @@ package Msg; use strict; +use DXUtil; + use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); use IO::Select; use IO::Socket; diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index d1b0b164..bde0a744 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -11,14 +11,12 @@ package Route::Node; use DXDebug; use Route; use Route::User; +use DXUtil; use strict; use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver( q$Revision$); use vars qw(%list %valid @ISA $max $filterdef); @ISA = qw(Route); diff --git a/perl/Route/User.pm b/perl/Route/User.pm index 46ee36d0..cc1e2d7e 100644 --- a/perl/Route/User.pm +++ b/perl/Route/User.pm @@ -10,14 +10,12 @@ package Route::User; use DXDebug; use Route; +use DXUtil; use strict; use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +($VERSION, $BRANCH) = dxver(q$Revision$); use vars qw(%list %valid @ISA $max $filterdef); @ISA = qw(Route); diff --git a/perl/cluster.pl b/perl/cluster.pl index 79bca264..8cb4dffb 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -131,11 +131,8 @@ $allowdxby = 0; # 1 = allow "dx by ", 0 - don't allow it use vars qw($VERSION $BRANCH $build $branch); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; -$main::build -= 3; # fudge (put back for now) +($VERSION, $BRANCH) = dxver( q$Revision$); +$main::build -= 2; # fudge (put back for now) -- 2.43.0