Philippe M. Chiasson wrote:


Stas Bekman wrote:

Philippe M. Chiasson wrote:


Stas Bekman wrote:


Philippe M. Chiasson wrote:



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 ?




Yes, but using those you can't tell from the declaration the scope of the directive. Is it really incovenient to have top-level declaration macros that tell it all?



It would be ideal, but what I am trying to say is that's it's error prone.


If you want a directive to be SRV + HTACCESS, you'd have to put

MP_CMD_SRV_AND_HTACCESS("<Perl>",[...]); (an alias for OR_ALL)

_AND_

MP_CMD_NO_DIR;

To the top of the directive implementation, so seeing MP_CMD_SRV_AND_HTACCESS in
modperl_cmd.h woundlnt' guarantee that the directive is doing that.


Do you see my point ?



Je vois, but that's exactly what I'm trying to avoid. So that the declaration will already cover MP_CMD_NO_DIR. So for example we could add a new bitmask:


# SRV + HTACCESS - DIR
MP_CMD("<Perl>",[...], SRV | HTACCESS)

# ALL
MP_CMD(..., SRV | HTACCESS | DIR)


Oh, I see. I didn't consider changing the way we are defining configuration
handlers in that way. That would make sense to me.

Is it essential _before_ we release ? Otherwise, I'll just add it as a good
todo item for when I am done hacking at todo/release...

No, not at all. In which case to start with it'd be nice to have a comment above each of those declarations which don't quite do what the declaration says, explaining what's special about them (e.g. -NO_DIR)



-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to