NAME
ROADS::DatabaseNames - A class to read in the list of ROADS databases
SYNOPSIS
use ROADS::DatabaseNames;
&ReadDBNames;
# let's see the database details for the 'cross domain' DB
print <<EOF;
database: $database{xdomain}
host: $host{xdomain}
port: $port{xdomain}
serverhandle: $serverhandle{xdomain}
invserverhandle: $invserverhandle{xdomain}
EOF
DESCRIPTION
This method reads the list of WHOIS++ servers/databases which this ROADS installation knows about and puts their details into hash arrays.
METHODS
ReadDBNames;
When this method is called, it creates the following hash arrays by parsing the list of known databases :-
- database
-
Holds the Destination tag (if any) used with this database when making a WHOIS++ search. Multiple Destination tags may be used to differentiate between multiple WHOIS++ databases held in a single server.
- host
-
Holds the Internet domain name or address of the host running the WHOIS++ server for this database.
- port
-
Holds the port number of the WHOIS++ server.
- serverhandle
-
Holds the server handle of this WHOIS++ server.
- invserverhandle
-
Converts the server handle back into a friendly service name.
All but the last of these arrays are indexed on the friendly service name, whereas the last is indexed on the server handle. So, in the example above...
$invserverhandle{$serverhandle{"xdomain"}} eq "xdomain"
FILES
config/databases - default location for databases list, overridden by dbnames variable if defined.
FILE FORMAT
The following fields are defined in the databases file, in the following order :-
- name
-
Long/friendly name of the service, e.g. "ROADS-U-LIKE".
- host
-
Domain name or IP address of the host running the WHOIS++ server.
- port
-
Port number of the WHOIS++ server.
- tag
-
Tag used in the Destination attribute - used if this server has multiple virtual databases in one collection of templates.
- handle
-
The WHOIS++ server's serverhandle.
BUGS
We should do something cleverer with this list, like have a "database" object which included protocol info and hooks for the methods to use to communicate with it. This would make it easier to link in other sources of info ?
SEE ALSO
"search.pl" in cgi-bin, "admin.pl" in admin-cgi, "tempbyhand.pl" in cgi-bin, "lookupcluster.pl" in admin-cgi,
COPYRIGHT
Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.
AUTHOR
Jon Knight <jon@net.lut.ac.uk>, Martin Hamilton <martinh@gnu.org>