4 # This is the new fundamental protocol engine handler
8 # Copyright (c) 2004 Dirk Koopman G1TLH
15 use vars qw($VERSION $BRANCH);
16 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
17 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/,(0,0));
18 $main::build += $VERSION;
19 $main::branch += $BRANCH;
28 @queue = (); # the thingy queue
30 # we expect all thingies to be subclassed
36 my ($type) = $class =~ /::(\w+)$/;
39 $self->{_tonode} ||= '*';
40 $self->{_fromnode} ||= $main::mycall;
41 $self->{_hoptime} ||= 0;
42 while (my ($k,$v) = each %$self) {
43 delete $self->{$k} unless defined $v;
48 # add the Thingy to the queue
54 # dispatch Thingies to action it.
57 my $t = pop @queue if @queue;
61 # go directly to this class's t= handler if there is one
64 # remove extraneous characters put there by the ungodly
66 $type = 'handle_' . $type;