Geoffrey Young wrote:
The only suggested way to achieve something like that is to piggyback configuration directive. If you have a module that wants to know the
value of DirectoryIndex, for instance, you could implement a mod_perl
handler that supports a DirectoryIndex directive, and return DECLINED,
passing it back to mod_autoindex. That module would need to merge
directory indexes in the same way mod_autoindex does it, but that's the core of the problem.


while that's a trick I have used often, it's not the _only_ way.  see recipe
 8.14 in the cookbook, along with the code from

That's true, that is another way.

http://www.modperlcookbook.org/code/ch08/Cookbook-LanguagePriority-0.01.tar.gz

which essentially allows you to peek into a module's private configuration,
which I'm pretty sure is the merged version at this point, but it's been a
while since I've really tested that code out.

anyway, the code is meant to be more of an illustration than a module you
would want to use in production, but still...

And it suffers from a pretty terrible dependency on the internal structure of the module you are peeking at to be static. You are basically defining a copy of the internal configuration structure of a module and can't ever be guaranteed that it will remain the same.

But, I have to admit to having done exactly just that at least once in
a production environment, so... it is inedeed just another way to do it.

and bonus karma points to anyone who groks the latin phrase on page 299 ;)

ill got, ill spent ;-)

Mal obtenu, Mal utilisé =;-)

--Geoff


-- -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to