[LON-CAPA-dev] Using a loncapa.conf variable
Scott Harrison
lon-capa-dev@mail.lon-capa.org
Fri, 25 Oct 2002 18:26:04 -0400
Dear Highly Esteemed Sir:
loncapa/loncom/configuration/Configuration.pm has the API
for accessing LON-CAPA configuration variables.
For documentation, type
perldoc ./Configuration.pm
An example is from lond:
# ---------------------------------- Read loncapa_apache.conf and loncapa.conf
&status("Read loncapa.conf and loncapa_apache.conf");
my $perlvarref=LONCAPA::Configuration::read_conf('loncapa.conf');
my %perlvar=%{$perlvarref};
undef $perlvarref;
Regards,
Scott
On Fri, Oct 25, 2002 at 06:05:48PM -0400, Mark Lucas wrote:
> Hi-
>
> I want to reference a variable in LON-CAPA conf, such as
> lonHostID.
>
> What is the explicit protocol?
>
> I see references to $perlvar in lonnet.pm
>
> I see usage of $r->dir_config('lonHostID') elsewhere (which requires
> the presence of $r).
>
> What are the other options (if any) for access? Any that do not require
> the use of the request handle?
>
> (I want to reference one of these variables in a routine within loncommon
> and currently the handle is not passed into this routine).
>
> Thanks,
> Mark
>
> ----------------------------------------------------------------------------
> Mark Lucas email: lucasm@ohiou.edu
> 252D Clippinger Lab phone: (740)597-2984
> Department of Physics and Astronomy fax: (740)593-0433
> Ohio University
> Athens, OH 45701
>
> _______________________________________________
> LON-CAPA-dev mailing list
> LON-CAPA-dev@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev
> ------( NOTE )------------->
> This E-mail was scanned for viruses by Ramcell Online (http://www.ramcell.net/antivirus.asp)
>
--
Scott Harrison, sharrison@users.sourceforge.net