You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/01/13 04:59:16 UTC

Grief, but good grief?

The following snippet:

LoadModule foo_module modules/mod_foo.so

<IfModule foo.c>

Isn't this a bit bogus to continue forever in perpetuity?

We have a chance to make a CLEAN BREAK from the nonsense.
Specifically, use foo_module for the friggin <IfModule> test.

[If you didn't guess, yes, it bit me tonight, for the third
time in a year.]

What say we?  Pre beta2?  Never?

Bill


Re: Grief, but good grief?

Posted by Ben Laurie <be...@algroup.co.uk>.
William A. Rowe, Jr." wrote:
> 
> > From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> > Sent: Friday, January 12, 2001 11:00 PM
> >
> > Would a macro, with a friend, declared as:
> >
> > #define AP_DECLARE_MODULE (mod) \
> > module AP_MODULE_DECLARE_DATA mod = { \
> > mod = { \
> > STANDARD20_MODULE_STUFF, \
> > #mod,
> 
> Whoops... try
> 
> #define AP_DECLARE_MODULE (mod) \
> module AP_MODULE_DECLARE_DATA mod = { \
>     STANDARD20_MODULE_STUFF, \
>     #mod,
> 
> for clarity's sake alone, not to mention it was wrong.

Yes! This is what I was talking about re: unique names. BTW, changing
this would affect hooks, coz they use the module names for ordering.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

RE: Grief, but good grief?

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Friday, January 12, 2001 11:00 PM
> 
> Would a macro, with a friend, declared as:
> 
> #define AP_DECLARE_MODULE (mod) \
> module AP_MODULE_DECLARE_DATA mod = { \
> mod = { \
> STANDARD20_MODULE_STUFF, \
> #mod,

Whoops... try 

#define AP_DECLARE_MODULE (mod) \
module AP_MODULE_DECLARE_DATA mod = { \
    STANDARD20_MODULE_STUFF, \
    #mod,

for clarity's sake alone, not to mention it was wrong.

RE: Grief, but good grief?

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Would a macro, with a friend, declared as:

#define AP_DECLARE_MODULE (mod) \
module AP_MODULE_DECLARE_DATA mod = { \
mod = { \
STANDARD20_MODULE_STUFF, \
#mod,

#define AP_END_DECLARATION };

(substitue names here, if you like) and simply used as:

AP_DECLARE_MODULE(access_module)
    create_access_dir_config,	/* dir config creater */
    NULL,			/* dir merger --- default is to override */
    NULL,			/* server config */
    NULL,			/* merge server config */
    access_cmds,
    NULL,			/* handlers */
    register_hooks		/* register hooks */
AP_END_DECLARATION

work for you?

> From: rbb@covalent.net [mailto:rbb@covalent.net]
> Sent: Friday, January 12, 2001 10:52 PM
> 
> > I'll ack that it's programmatically tricky or more work.  I'll sleep on
> > that half of this issue.
> 
> If you can solve the programmatic part of the problem, you have my +1.  I
> just don't see how to do this without forcing module authors to put the
> structure name actually in the structure, which I dislike.  At least if
> it's the .c file name, we can be sure that they won't forget it.  :-)


Re: Grief, but good grief?

Posted by rb...@covalent.net.
> Give you an example, you download libfoo.so.  How on earth are you supposed
> to know it's actually foo.c, mod_foo.c, or foobar.c?
> 
> You don't.  You have the docs.  They document three different things
> and it's easy to cross them up.  They _could_ document just two entries.
> 
> I'll ack that it's programmatically tricky or more work.  I'll sleep on
> that half of this issue.

If you can solve the programmatic part of the problem, you have my +1.  I
just don't see how to do this without forcing module authors to put the
structure name actually in the structure, which I dislike.  At least if
it's the .c file name, we can be sure that they won't forget it.  :-)

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: Grief, but good grief?

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Give you an example, you download libfoo.so.  How on earth are you supposed
to know it's actually foo.c, mod_foo.c, or foobar.c?

You don't.  You have the docs.  They document three different things
and it's easy to cross them up.  They _could_ document just two entries.

I'll ack that it's programmatically tricky or more work.  I'll sleep on
that half of this issue.

Bill


----- Original Message ----- 
From: <rb...@covalent.net>
To: <ne...@apache.org>
Sent: Friday, January 12, 2001 10:22 PM
Subject: Re: Grief, but good grief?


> 
> > LoadModule foo_module modules/mod_foo.so
> > 
> > <IfModule foo.c>
> > 
> > Isn't this a bit bogus to continue forever in perpetuity?
> > 
> > We have a chance to make a CLEAN BREAK from the nonsense.
> > Specifically, use foo_module for the friggin <IfModule> test.
> > 
> > [If you didn't guess, yes, it bit me tonight, for the third
> > time in a year.]
> > 
> > What say we?  Pre beta2?  Never?
> 
> Just a question, but how would you go about doing this?  Currently, it is
> possible because we store the file name in the module structure.  This is
> done with a macro so that module authors don't even know we are doing it.
> 
> How would you store the structure name without letting the module authors
> know?
> 
> I guess it makes sense to me that we are saying "If the module in the file
> foo.c is loaded", instead of "If the module referred to as foo_module".
> 
> How do real users, not programmers mind you, know the name of the module
> structure?  Obviously, we always have this problem because of the
> LoadModule command, but the .c file just makes more sense to me.  All my
> opinion of course.  :-)




Re: Grief, but good grief?

Posted by rb...@covalent.net.
> LoadModule foo_module modules/mod_foo.so
> 
> <IfModule foo.c>
> 
> Isn't this a bit bogus to continue forever in perpetuity?
> 
> We have a chance to make a CLEAN BREAK from the nonsense.
> Specifically, use foo_module for the friggin <IfModule> test.
> 
> [If you didn't guess, yes, it bit me tonight, for the third
> time in a year.]
> 
> What say we?  Pre beta2?  Never?

Just a question, but how would you go about doing this?  Currently, it is
possible because we store the file name in the module structure.  This is
done with a macro so that module authors don't even know we are doing it.

How would you store the structure name without letting the module authors
know?

I guess it makes sense to me that we are saying "If the module in the file
foo.c is loaded", instead of "If the module referred to as foo_module".

How do real users, not programmers mind you, know the name of the module
structure?  Obviously, we always have this problem because of the
LoadModule command, but the .c file just makes more sense to me.  All my
opinion of course.  :-)

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------