Stas Bekman wrote:
Joe Orton wrote:
On Wed, Aug 18, 2004 at 12:34:01PM -0700, Stas Bekman wrote:
Joe Orton wrote:
On Wed, Aug 18, 2004 at 07:55:25PM +0100, Joe Orton wrote:
On Wed, Aug 18, 2004 at 10:54:13AM -0700, Stas Bekman wrote:
Joe Orton wrote: Thanks Joe.
Any chance this can be rewritten to find out what syntax to use (2.0 or 2.1) once and not do that repeatedly? This function is the cause of the slow configuration (too many shell calls), so trying to minimize it will be a great thing.
Why "repeatedly"? Surely since the value is cached it's only done twice, once for apr-config and once for apu-config?
No, I meant to have two branches: one for 2.0 and one for 2.1, so in case a call to the 2.0 style apxs returns no value it won't try to call 2.1 style?
OK, just to be clear: you just want the order reversed: run through the current logic, then try -q AP?_CONFIG if none of that worked? Or are you asking for all the current logic to be simplified too?
No, I suggested to figure out whether we are running under 2.0 or 2.1 and then use the appropriate method, without trying both. e.g.:
if (httpd 2.0) { # the current way } else { # 2.1 has apxs -q AP[RU]_CONFIG as the definitive location my $apxs_key = uc($what) . "_CONFIG"; ... }
will that work?
As a solution for too many shell calls (unrelated to your proposal, Joe) I think we should use a dbm file to cache all the values, so it can be reused across many Makefile.PL calls (or may be something else).
Worth noting that you can call apxs -q for many values (they are ;; separated) $>/usr/sbin/apxs -q EXTRA_CFLAGS EXTRA_CPPFLAGS MPM_NAME -pthread;;-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE;;prefork
-- -------------------------------------------------------------------------------- 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