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;
24 # we expect all thingies to be subclassed
34 # send it out in the format asked for, if available
42 } elsif ($chan->isa('DXChannel')) {
46 # generate the line which may (or not) be cached
48 if (my $ref = $thing->{class}) {
49 push @out, ref $ref ? @$ref : $ref;
52 my $sub = "gen_$class";
53 push @out, $thing->$sub() if $thing->can($sub);
55 $chan->send(@out) if @out;