Philippe M. Chiasson wrote:
On Mon, 2004-03-15 at 22:27 -0500, 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.


True, that's why it sould be at least clearly documented that the right
way of doing something like that is :

$Location{"/data"} = [...];
$Location{"/data/preview"} = [...];

Then at least, for common one-level cases, the Tie::IxHash magic could
certainly help. Otherwise, even with documentation, how is one supposed
to achieve something like that?

tie %Location, ...; $Location{"/data"} = [...]; $Location{"/data/preview"} = [...];

I'll take a shot at it this week unless someone wants to beat me to it.

Go Philippe, go!


__________________________________________________________________
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