]> dxcluster.net Git - spider.git/blob - perl/DXXml.pm
fix 5.8 ism that does not work on 5.6 (incrementing a subroutine).
[spider.git] / perl / DXXml.pm
1 #
2 # XML handler
3 #
4 # $Id$
5 #
6 # Copyright (c) Dirk Koopman, G1TLH
7 #
8
9 use strict;
10
11 package DXXml;
12
13 use DXChannel;
14 use DXProt;
15
16 use vars qw($VERSION $BRANCH $xs);
17 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
18 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/  || (0,0));
19 $main::build += $VERSION;
20 $main::branch += $BRANCH;
21
22 $xs = undef;                                                    # the XML::Simple parser instance
23
24 sub init
25 {
26         return unless $main::do_xml;
27         
28         eval { require XML::Simple; };
29         unless ($@) {
30                 import XML::Simple;
31                 $DXProt::handle_xml = 1;
32                 $xs = new XML::Simple();
33         }
34         undef $@;
35 }
36
37 sub normal
38 {
39
40 }
41
42 sub process
43 {
44
45 }
46 1;