AcePerl
view release on metacpan or search on metacpan
README.ACEBROWSER view on Meta::CPAN
moviedb An example database of movies running on port 200008
of stein.cshl.org
default An oldish snapshot of the C. elegans database running
on port 2005 of stein.cshl.org
To select among the data sources, append the symbolic name to the end
of the URL of the desired CGI script. For example, to do a text
search on the "moviedb" database, fetch this URL:
http://your.site/cgi-bin/ace/searches/text/moviedb
If no symbolic name is specified, the default database is assumed.
http://your.site/cgi-bin/ace/searches/text
is equivalent to
http://your.site/cgi-bin/ace/searches/text/default
As described in EXTENDING ACEBROWSER, another way to select among
databases is to place the CGI script itself in a directory with the
same name as the database. For example, if you have written a
specialized CGI script called screenplay that is designed to work with
the "moviedb" database, you could place it in a subdirectory named
moviedb, and refer to it this way:
http://your.site/cgi-bin/ace/moviedb/screenplay
The symbolic name can actually appear anywhere in the path, so this
would work as well:
http://your.site/cgi-bin/ace/moviedb/custom/screenplay
THE CONFIGURATION FILES
The configuration files are located in the directory selected for
acebrowser configuration. Their names are formed by appending ".pm"
to the symbolic name of the database. For example, the configuration
file "simple.pm" corresponds to the database "simple".
Each of the configuration files is actually an executable Perl script.
As such it can use any Perl constructions you wish, including variable
interpolation. The purpose of the configuration file is to set a
series of configuration variables, which by convention are all
uppercase. For example, here is an excerpt from the default.pm
configuration file:
$HOST = 'stein.cshl.org';
$PORT = 2005;
$USERNAME = '';
$PASSWORD = '';
In addition to scalar variables, the configuration file is used to set
arrays, hashes and specially-named functions.
If you are only interested in accessing a single database, it is
easiest to modify the default.pm configuration file. To serve
multiple databases, just make a copy of default.pm and edit the copy.
If, for some reason, Acebrowser cannot find its configuration files,
it will generate an internal server error. The location of the
configuration files directory is stored in the module
Ace::Browser::LocalSiteDefs, typically somewhere inside the
"site_perl" subdirectory of the Perl library directory (use "perl -V"
to see where that is). You can find out where Acebrowser expects to
find its configuration files by running the following command:
perl -MAce::Browser::LocalSiteDefs \
-e 'print $Ace::Browser::LocalSiteDefs::SITE_DEFS,"\n"'
To change this value, either reinstall Aceperl or edit
LocalSiteDefs.pm manually.
EDITING THE CONFIGURATION FILE
The settings in the default.pm configuration file distributed with
AcePerl should work with little, if any modification. The following
variables may need to be tweaked:
$ROOT = '/cgi-bin/ace';
This is the root (top level) for all the Acebrowser CGI scripts.
Change this if necessary.
$DOCROOT = '/ace';
This is the root (top level) for all of Acebrowser's static HTML files
and images. You will need to change this if the static files are
installed somewhere else.
$ICONS = "$DOCROOT/ico";
This is where Acebrowser expects to find its icons. This subdirectory
holds icons and other small static images. Note how the
previously-defined $DOCROOT variable is used. You will probably not
need to change this.
$IMAGES = "$DOCROOT/images";
This is where Acebrowser expects to find its "images" subdirectory.
This directory contains images generated dynamically by the ACEDB
database. It *must* be writable by the web server user, usually
"nobody". When the AcePerl install script creates this directory, it
makes it world-writable by default. You may prefer to make it owned
by the "nobody" user and/or group.
$HOST = 'stein.cshl.org';
This is the name of the host where the desired acedb server can be
found.
$PORT = 2005;
This is the network port on which the desired acedb server is
listening. Network ports in the range 1024-65535 are assumed to
correspond to the newer socket-based sgifaceserver. Ports in the
range 65536-4,294,967,296 are assumed to correspond to the older
RPC-based gifaceserver.
$USERNAME = '';
$PASSWORD = '';
( run in 0.864 second using v1.01-cache-2.11-cpan-39bf76dae61 )