mod_perl 2.0 now has a new hook: the PerlMapToStorageHandler
.
from what I can tell, translation in Apache 2.0 isn't quite the same as it used to be - it looks like the core translate_name
phase simply figures out what r->filename
ought to be (by overlaying DocumentRoot
or various Alias
mappings) and the map_to_storage
phase actually does the filesystem stat
calls to determine the file to serve and things like r->path_info
. this is very different from 1.0, where the stat
calls could be overridden with a PerlTransHandler
.
so, the bad news is that returning OK
from a PerlTransHandler
will not reduce IO overhead for dynamic URLs. The good news is that now you can use a PerlMapToStorageHandler
for that. and while I'm still trying to figure it all out, it seems that the canonical use for each will remove the separation of functionality required in 1.0. That is, the PerlTransHandler
can be used to safely meddle with $r->filename
, return OK
, and still let Apache's core mapping engine serve the right file. cool.