Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 33177 invoked from network); 21 Feb 2006 19:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Feb 2006 19:40:12 -0000 Received: (qmail 76910 invoked by uid 500); 21 Feb 2006 19:40:05 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 76891 invoked by uid 500); 21 Feb 2006 19:40:05 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 76879 invoked by uid 99); 21 Feb 2006 19:40:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 11:40:05 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of torsten.foertsch@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 21 Feb 2006 11:40:04 -0800 Received: (qmail invoked by alias); 21 Feb 2006 19:39:42 -0000 Received: from dialin096079.justdsl.de (EHLO opi.home) [85.25.96.79] by mail.gmx.net (mp030) with SMTP; 21 Feb 2006 20:39:42 +0100 X-Authenticated: #1700068 Received: by opi.home (Postfix, from userid 1000) id 6AA5F8BF0F; Tue, 21 Feb 2006 20:39:40 +0100 (CET) From: Torsten Foertsch To: modperl@perl.apache.org Subject: Re: what is the best way to do ... Date: Tue, 21 Feb 2006 20:39:35 +0100 User-Agent: KMail/1.7.1 References: <200602211838.50515.torsten.foertsch@gmx.net> <43FB5920.4080007@modperlcookbook.org> In-Reply-To: <43FB5920.4080007@modperlcookbook.org> Cc: Geoffrey Young MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart30833663.D6fz9vr3Ad"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602212039.40066.torsten.foertsch@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --nextPart30833663.D6fz9vr3Ad Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 21 February 2006 19:17, Geoffrey Young wrote: > > I need something like this: > > > > __END__ > > =3D 2.2.0> > > AllowOverride AuthConfig Options=3DIndexes,FollowSymLinks > > > > > > Unfortunately, IfVersion is valid only from 2.0.56 on. Is there a > > workaround in mod_perl or AT? > > I understand what you're asking, but it's not there :) > > I take it that Options=3DIndexes is the problematic part? > > the only thing I can think of is using something like this > > =A0 > =A0 =A0... > =A0 > > then using t/TEST.PL as a template (instead of the default generated > t/TEST) and include logic something like this > > if (have_min_apache_version(2.2)) { > =A0 Apache::TestRunPerl->new->run(@ARGV, '-defines', 'APACHE2_2'); > } > else { > =A0 Apache::TestRunPerl->new->run(@ARGV); > } > > or somesuch. =A0you'll need to pull some additional trickery to actually = get > have_min_apache_version() to work but I think you get the idea :) Thanks Geoff. I am actually preparing a patch for mod_perl that solves these problems: http://www.gossamer-threads.com/lists/modperl/dev/86456 http://www.gossamer-threads.com/lists/modperl/dev/86972 It=20 a) extends the interface of Apache2::RequestUtil::add_config: $r->add_config(\@lines, $override, $path, $override_opts) b) adds a function allow_override_opts() to read ((core_dir_config *)conf)->override_opts c) adds Apache2::CmdParms::override_opts. =46or Apache 2.0.x these functions return 255, the default value in 2.2. Se= tting=20 Apache2::CmdParms::override_opts dies for 2.0 and the override_opts paramet= er=20 to add_config is simply ignored in 2.0. When adding tests I stumbled. Where do I have to add the -defines trick in= =20 this case? Btw, does anyone know why $r->add_config always passes a path in cmd_parms?= I=20 have tried passing also NULL pointers. For some configuration directives th= at=20 causes segfaults but sometimes it's useful (for example if a blo= ck=20 is to be passed to $r->add_config). I'd like to extend the interface to pas= s=20 a NULL pointer in cmd_parms if an empty string is passed to add_config. Would such a patch have any chances to get into mod_perl? Torsten --nextPart30833663.D6fz9vr3Ad Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBD+2x8wicyCTir8T4RAlj2AJ4mg2fMRv+rtyF7gdfzXL6zrrWQfQCdEZ6J DiRtccCtxUObuHDYrNcCmyU= =bbyf -----END PGP SIGNATURE----- --nextPart30833663.D6fz9vr3Ad--