Philippe M. Chiasson wrote:
On Mon, 2004-03-15 at 15:49 -0800, Stas Bekman wrote:
David Wheeler wrote:
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.
[...]
It's a known problem, David. Perhaps Philippe, the <perl> sections maestro,
may consider to raise the priority on solving it. I'm not sure whether using
Tie::IxHash may help on the user side.
Unless anybody can think of a better solution, and if adding back a
dependency on Tie::IxHash, i'll work on a patch to add Tie::IxHash magic
to %Location, %VirtualHost, %Directory, etc...
Think more about it, I doubt it will help. Take a look at how David and most
users do it:
$Location = { "/data" => { SetHandler => 'default-handler' },
"/data/preview" => {
SetHandler => 'perl-script',
PerlFixupHandler =>
'Bric::App::PreviewHandler::fixup_handler',
PerlHandler => 'Bric::App::Handler'
}};
it's too late to add any magic, since the original order is lost long before
you can add the magic.
I think it's a user-side problem, not the server side. All <perl> section has
to be careful about is not to copy anything, so that if a user makes $Location
a tied hash, <perl> section won't override it. May be just documenting the
issue will do the trick?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
|