Geoffrey Young wrote:
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?


IIRC, mp1 uses Tie::IxHash magically behind the scenes if it is available.
however, it's still not enough, not only because it only goes one level deep
(and thus won't hold multiple levels as in Stas example) but also because

It was actually David's real config section.


Tie::IxHash is itself insufficient.  consider RewriteRule, RewriteRule,
RewriteMap.

Also things like Filters ordering.


PerlOutputFilterHandler First
PerlOutputFilterHandler Second

my suggestion is to nix the Tie::IxHash magic and just be sure that the
<Perl> implementation respects multi-tiered tied hashes - both Tie::IxHash
and Tie::DxHash.

i.e. we delegate this to users and need to document the issue, right?


+1

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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



Reply via email to