The way I made this work is to create a config module, which contains
something similar to this:

# global config file (filename is /mystuff/perl/MyConfig.pm)

package MyConfig;
use strict;

use vars qw($var1 $var2 $var3);

$var1 = "data1";
$var2 = 123124;
$var3 = "more data";

1;


This can then be used from any other script, as follows:

use lib '/mystuff/perl';
use MyConfig;

$localVar1 = "$MyConfig::var1";

etc.. Hope this helps.

Cheers,

  Miah

-----Original Message-----
From: Ged Haywood [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 24, 2000 10:01 AM
To: mod_perl mailing list
Subject: Re: using a module to contain settings.


Hi all,

On Thu, 22 Jun 2000, Frank Wiles wrote:

> Where I work we store them as PerlSetVar's in the Apache config, we
> store all implementation specific things in there such as the page
> title, the URL to the module we are using, database user and
> password, etc, etc.

Like Frank I've used PerlSetVar, adding mod_macro to configure
multiple sites which have similar features (holiday travel business).

73,
Ged.

Reply via email to