Stas Bekman wrote:
Philippe M. Chiasson wrote: [...]
If the macro is supposed to suggest the allowed context and PerlModule is not allowed in DIR, then DIR is not appropriate. I see no problem with long names if they require no extra source code reading to figure out what they really do. These are internal macros and there are used in one place, so what's the big deal with choosing a clear name, even if it's long?
Well, there are 2 macros that must work together, so one possibility would be so call
MP_CMD_ANYWHERE_RAW_ARGS("Perl", perldo, "Perl Code"),
And clearly at the top of the perldo implementation: MP_CMD_SRV_DECLARE(requires) { MP_dSCFG(parms->server); MP_PERL_DECLARE_CONTEXT; MP_CMD_SERVER_OR_HTACCESS_ONLY;
Would something like that be somewhat clearer ?
We have the following contexts:
DIR SRV HTACCESS
Well, as far as httpd is concerned, we have:
SRV DIR (HTACCESS) ALL
each directive can be either:
DIR SRV SRV + HTACCESS DIR + HTACCESS
correct? So why not base the naming based on that?
More like
DIR SRV ALL ALL -DIR (SRV & HTACCESS) ALL -HTACCESS (SRV & DIR)
So, I'd suggest this naming
MP_CMD_DIR_... MP_CMD_SRV_... MP_CMD_ALL_...
with 2 new macros : MP_CMD_NO_DIR MP_CMD_NO_HTACCESS
To add to the top of a directive handler ? -- -------------------------------------------------------------------------------- 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
signature.asc
Description: OpenPGP digital signature
