perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryn Dyment <>
Subject PerlOptions +Parent and virtual hosts
Date Fri, 01 May 2009 07:06:25 GMT

I have successfully been using name-based virtual hosts and have just
added "PerlOptions +Parent" as a way to have multiple branches of my
codebase running on the same server.  A typical virtual host is
configured as:

<VirtualHost *:80>
    ServerName    trunk.translator.xcma.devo
    DocumentRoot  C:\depot\trunk\perl\xcma\translator\html

    PerlOptions  +Parent

        use lib 'C:\depot\trunk\perl\common';
        use lib 'C:\depot\trunk\perl\xcma\common';
        use lib 'C:\depot\trunk\perl\xcma\translator';

    PerlRequire  C:\depot\trunk\perl\xcma\translator\

    PerlSetVar MasonAutohandlerName autohandler.mas
    PerlSetVar MasonCompRoot        "site =>
    PerlAddVar MasonCompRoot        "comp => C:\depot\trunk\perl\common\html"
    PerlSetVar MasonDataDir
    PerlSetVar MasonEscapeFlags     "h =>

    <LocationMatch "\.(css|html|js)$">
        SetHandler   perl-script
        PerlHandler  HTML::Mason::ApacheHandler

The only difference versus the other virtual hosts is the replacement
of "trunk" with "release".

When I launch Apache, it crashes unless I also have the following
virtual host configured at the end of my httpd.conf:

<VirtualHost *:80>
    ServerName    localhost
    DocumentRoot  C:

    PerlOptions   +Enable

I've found that I can have any perl-related directive in place of
"PerlOptions +Enable" (e.g., replaced with "PerlModule  HTML::Mason").
 If I remove the directive, or if I remove this virtual host
altogether, it crashes (with no error).  This is on Windows ... my
development environment ... haven't experimented on my Linux server

Hoping somebody can help ... thanks!

View raw message