[EMAIL PROTECTED] (Geoffrey Young) wrote:
>> -----Original Message-----
>> From: Michael Hall [mailto:[EMAIL PROTECTED]]
>>
>> On Thu, Aug 03, 2000 at 01:27:17PM +0100, Matt Sergeant wrote:
>>
>> > Which raises an interesting question... Is there any way for
>> > Makefile.PL to determin if a particular option was enabled at
>> > mod_perl build time?
>>
>> 'http://site/perl-status?hooks' ?
>
>that's for run time - we're looking for a way to discover enabled hooks that
>doesn't require a running server.
I did a little checking, and now my guess is that there isn't a way. Have a
look at the C code that checks whether hooks exists (in perl_config.c):
int perl_hook(char *name)
{
switch (*name) {
case 'A':
if (strEQ(name, "Authen"))
#ifdef PERL_AUTHEN
return 1;
#else
return 0;
#endif
if (strEQ(name, "Authz"))
#ifdef PERL_AUTHZ
return 1;
#else
return 0;
#endif
...
Not exactly a hash lookup. =)
So currently the only way it would be possible to check for the presence
of various hooks would be to start up a copy of the server and check
&mod_perl::hook() for each required hook. This task, though ugly, would
be greatly simplified by using the patches I submitted for Apache::test.
Then it could feasibly be done at Makefile.PL time, but might more
naturally go into one of the 'make test' tests.