Skip to main content.
home | support | download

Back to List Archive

Re: DEFAULT_CONFIG_FILE in 2.2 question

From: Bill Moseley <moseley(at)>
Date: Mon Sep 09 2002 - 15:22:16 GMT
At 08:12 AM 09/09/02 -0700, Jody Cleveland wrote:
>Well, now that I've finally gotten 2.1 working, I thought I'd try 2.2 for
>Windows. I am trying to match the setup I've got for 2.1, and I noticed this
>line at the top of swish.cgi:
>my $DEFAULT_CONFIG_FILE = '.swishcgi.conf';
>Can I cut this section from swish.cgi?:
>sub default_config {
>	etc...
>And place it in swishcgi.conf? The readme doc at the end of the file didn't
>seem real clear. What exactly is the file for?

It's a configuration file for the script.  Means you can configure the script without editing it.

perldoc swish.cgi and search for ".swishcgi.conf".

> fgrep -n .swishcgi.conf swish.cgi

9:my $DEFAULT_CONFIG_FILE = '.swishcgi.conf';
83:#   is .swishcgi.conf by default (read from the current directory) that must return
1711:configuration can be modified by editing this script directly, or by using a configuration file (.swishcgi.conf
2048:By default, the script will attempt to read from the file F<.swishcgi.conf>.
2050:in the script.  Simply create a file called F<.swishcgi.conf> in the same directory as the CGI script:
2052:    > cat .swishcgi.conf
2207:    ~/swishtest >cat .swishcgi.conf
2218:    ---------- Read config parameters from '.swishcgi.conf' ------
2234:F<.swishcgi.conf> file and add a "use lib" setting:
2236:    ~/swishtest >cat .swishcgi.conf
2247:    ---------- Read config parameters from '.swishcgi.conf' ------
2269:    ---------- Read config parameters from '.swishcgi.conf' ------
2339:    ~/swishtest >cat .swishcgi.conf

Bill Moseley
Received on Mon Sep 9 15:25:50 2002