You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Risanecek <ri...@gmail.com> on 2005/10/15 17:32:26 UTC

PerlAddVar in sections

Hi,

I'm fascinated by possibilities <perl></perl> sections offer. I'm in the process
of converting some VirtualHost blocks to <perl></perl> flavour because there
is much redundancy in them and I thought I'd do it with mod_define. Bah!

However, I do have some trouble to get the syntax right for the
PerlAddVar/PerlSetVar directives. e.g.


  PerlAddVar  MasonCompRoot                   "main    =>
/data/proj/document_root"
  PerlAddVar  MasonCompRoot                   "private =>
/data/proj/mason_components"

    PerlSetVar  MasonSessionClass               Apache::Session::MySQL
    PerlSetVar  MasonSessionDataSource          dbi:mysql:session

How do I write these right? Especially the PerlAddVar is driving me crazy.
I assume it should go much easier now to set some Perl variables!?

Please enlighten me.

Richard

Re: PerlAddVar in sections

Posted by "Randal L. Schwartz" <me...@stonehenge.com>.
>>>>> "Risanecek" == Risanecek  <ri...@gmail.com> writes:

Risanecek> How do I write these right? Especially the PerlAddVar is
Risanecek> driving me crazy.  I assume it should go much easier now to
Risanecek> set some Perl variables!?

They aren't really "perl" variables, but rather dir_config thingies
that are fetched with $r->dir_config("name"), so there's not really
any easy way I know of to "fake" that in a <Perl> section.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!