> What I don't yet understand is the other direction: How do I make
> individual configuration variables, taken from database.cfg, available in
> the modules or db.cgi? I guess that would be a job for "require", but am
> not sure.

You have a number of options. My prefered one is to do this:

(options.pl)
sub &get_options {
    my %options;
    $options{'Some config variable'} = "la";
    $options{'Something Else'} = "ba";
    return \%options;
}
1;

(main.cgi)
require options.pl;
my %options = %{&get_options};


Your mileage may vary. May I suggest you read the perlfunc entry for require
(type 'perldoc -f require' at the command line, or go to
http://www.perldoc.com)

Hope this helps
_Pete

--
[EMAIL PROTECTED]
;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT
yvlkbfdtcierstajogvPruntRshackRJelov')=~
y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to