###################################################################
###                                                             ###
###    Author: Stefan Evert                                     ###
###   Purpose: CQPDemo configuration and basic functions        ###
###   Created: Mon Apr 21 18:56:21 2003                         ###
###  Modified: Mon Mar  1 13:38:59 2004 (evert)                 ###
###                                                             ###
###################################################################


## This software is provided AS IS and the author makes no warranty as to
## its use and performance. You may use this library, redistribute and
## modify it under the same terms as Perl itself.
## 
## IN NO EVENT WILL THE AUTHOR BE LIABLE TO YOU FOR ANY CONSEQUENTIAL,
## INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS OR LOST
## SAVINGS, EVEN IF AN IMS REPRESENTATIVE HAS BEEN ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY.


package My::Config;
use Carp;
$BaseDir = "/crpc/htdocs/CWB/CQPDemo/";	     
$CacheDir = "/tmp/CQPDemo-Cache";		# local cache directory for persistent query results
$CacheSize = 10;				# maximal cache size in MBytes
$CacheExpire = 24;				# maximal storage time before query results expire (in hours)

$ImgDir = "$BaseDir/img";
$CSSDir = "$BaseDir/css";

$Corpus = "DICKENS";				# name of CWB corpus
$Registry = undef;				# set to registry directory if not in standard registry
$RegistryFlag = (defined $Registry) ? "-r $Registry" : ""; # registry flag to pass to CWB tools

$MaxMatches = 50000;				# maximum number of matches allowed in CQP queries

##
##  Load and configure CGI module (should automatically apply to other modules importing CGI.pm)
##
use CGI qw/:standard/;

$CGI::POST_MAX = 50 * 1024;			# avoid denial-of-service attacks
$CGI::DISABLE_UPLOADS = 1;			# (no file uploads, accept max. 50k of POST data)


##
##  Start CQP process and initialise persistency cache
##

use CQP;
#use WebCqp::Persistent;
return 1;
