>> what about just 'user'?
>
>
> and what's the mnemonic here? Really, this could be anything,
yes, I think that was my point. 'user' would be userspace tests, such as
those that excercise non-unit, multiple-API tests, or apache integration
tests, etc. you were asking for suggestions, and it's much more intuitive
to me than 'cooks' :)
>> good thing we have a PerlMapToStorageHandler ;)
>
>
> Yeah, good indeed.
>
> First of all, how about dumping the above into
> modperl-docs/src/docs/2.0/user/handlers/http.pod? That new phase is
> completely undocumented (besides mentioning that it exists). And
> mentioning in the performance chapter that one needs to use
> PerlMapToStorageHandler to shortcut the stat() calls.
I'll try to come up with something soonish.
> I guess with:
>
> PerlMapToStorageHandler Apache::OK
>
> which will work only if all requests are to the virtual namespace.
yes, and the same was true in the mp1/PerlTransHandler case.
> I've
> changed the test below to do it only for that particular test.
cool.
>
> Still it's possible that
>
> $r->filename('');
>
> in transhandler (if you do rewrite the namespace already) is another
> working solution too, since you need the transhandler, and you don't
> need to write a maptostorage handler at all.
it looks like core_map_to_storage will be short-circuited in that case, but
with a different warning (unless the '' gets translated to NULL someplace).
nevertheless, that's a bit hackish. the new idiom is to use the
PerlTransHandler to translate the URI to a filename, and the
PerlMapToStorageHandler to map the filename to a physical file on disk. so,
in examples, tests, and whatnot I'd try to emphasize the difference and use
only the appropriate hook so it will help people learn. what we do in our
own code is another matter :)
> You suggest to skip the PerlTransHandler completely only when you want
> to avoid the stat calls, right?
yes, I think that's the right thing to do.
> You still need it for rewrites.
indeed. I was commenting in a 'knowledge for knowledge sake' sense, not
necessarily to say you didn't need the trans handler in your test.
however, in your new test...
> #$r->filename(''); # make Apache happy
this is not required since you
> # skip ap_directory_walk stat() calls
HTH
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]