Hi All,

I just realized that there's an issue with <Perl> sections. It seems that, because items like $Location are managed as hash references, and because you can't predict the order in which a hash is evaluated (esp. in Perl 5.8.1 and later), that some sections can be overridden. For example, I have code similar to this in Bricolage:

$Location = { "/data" => { SetHandler => 'default-handler' },
"/data/preview" => {
SetHandler => 'perl-script',
PerlFixupHandler => 'Bric::App::PreviewHandler::fixup_handler',
PerlHandler => 'Bric::App::Handler'
}};


However, I find that often, the resulting httpd.conf directives get written and sent to Apache as:

    <Location /data/preview>
        PerlFixupHandler Bric::App::PreviewHandler::fixup_handler
        SetHandler perl-script
        PerlHandler Bric::App::Handler
    </Location>
    <Location /data>
      SetHandler default-handler
    </Location>

As a result, the settings in /data/preview do not take effect, because /data is declared after /data/preview.

I tried using arrays to get around this issue:

$Location = [ { "/data" => { SetHandler => 'default-handler' }},
{ "/data/preview" => {
SetHandler => 'perl-script',
PerlFixupHandler => 'Bric::App::PreviewHandler::fixup_handler',
PerlHandler => 'Bric::App::Handler'
}}
];


But then Apache simply doesn't start. There are no error messages, I just get "httpd could not be started".

Is anyone aware of another workaround for this issue? And if not, what can we do to fix it?

Many TIA,

David


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



Reply via email to