use DXDebug;
use DXChannel;
+use DXUtil;
use Prefix;
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;
-
use vars qw(%list %valid $default);
+($VERSION, $BRANCH) = dxver(q$Revision$);
+
%list = ();
$default = 99; # the number of hops to use if we don't know
%valid = (
my $interface = shift;
my $hops = shift || $default;
my $ref = $list{$call} || RouteDB->new($call);
- my $iref = $ref->{item}->{$interface} ||= RouteDB::Item->new($interface);
+ my $iref = $ref->{item}->{$interface} ||= RouteDB::Item->new($interface, $hops);
$iref->{count}++;
$iref->{hops} = $hops if $hops < $iref->{hops};
$iref->{t} = shift || $main::systime;
{
my $pkg = shift;
my $call = shift;
- return bless {call => $call, hops => $RouteDB::default}, (ref $pkg || $pkg);
+ my $hops = shift || $RouteDB::default;
+ return bless {call => $call, hops => $hops}, (ref $pkg || $pkg);
}
1;