added a query routine
[spider.git] / perl / dbtest.pl
1 #!/usr/bin/perl
2 # test for independent sql servers
3 # search local then perl directories
4
5 use vars qw($root);
6
7 BEGIN {
8         # root of directory tree for this system
9         $root = "/spider"; 
10         $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
11         
12         unshift @INC, "$root/perl";     # this IS the right way round!
13         unshift @INC, "$root/local";
14 }
15
16 use DXUtil;
17 use DXDebug;
18 use ARRL::DX;
19
20
21 while (@ARGV) {
22         my $fn = shift;
23         if ($fn eq '-d') {
24                 ARRL::DX::drop();
25                 next;
26         }
27         print "Processing $fn ";
28         my $dx = ARRL::DX->new(file=>$fn);
29         my $c = $dx->process;
30         print "$c paragraphs\n";
31 }
32
33 ARRL::DX::close();
34
35 exit 0;