Thanks for the answers folks... I must've been having a blonde moment, I'm sure I knew that somewhere.

Skipping the directory walk is one of the reasons I'm using a MapToStorage handler - no need for all that disk access - but I'm also using it to map /content/some/path onto /content/<hostname>/some/path, so I wanted to enable/disable it in <Location>.

I can tell my custom config to write config values into the server config.

cheers
John

Geoffrey Young wrote:

William A. Rowe, Jr. wrote:
Fred Moyer wrote:

On Fri, 27 Oct 2006, John ORourke wrote:


Hi folks,

I've implemented some custom config directives, works fine.

However, when my MapToStorage handler asks for the per_dir_config
hash, it seems to be getting the server config - all other handlers
get the per-dir no problem.
My guess is that you cannot access MapToStorage because at this phase
the request has not yet been associated with a particular filename or
directory [1].

yes.  in fact, you can't even place the PerlMapToStorageHandler in a
<Location> block, so by definition you won't (yet) have a meaningful
per-directory config.

I wrote as much hours ago, but my response seems to have vanished into
the aether.  maybe it's been so long since I posted here the list daemon
is trying to teach me a lesson :)

[1]
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlMapToStorageHandler
Note that MapStorageToHandler does this association, so hook ordering plays
a huge role.  It's critical that if you plan to morph the entity you do so
BEFORE the core directory_walk occurs, if you are inspecting it that should
happen AFTER to core directory_walk.

pretty much the only honest reason I can think of for writing a
PerlMapToStorageHandler is for removing directory_walk on servers
generating 100% dynamic content.  of course, we often do very dishonest
things over here in mod_perl land ;)

--Geoff


Reply via email to