1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
From: David Wheeler <david@wheeler.net>
Subject: Re: 1.1rc2 was (Re: [Fwd: Re: [proposal/vote] OS X support])
To: Stas Bekman <stas@stason.org>
Cc: Joe Schaefer <joe+apache@sunstarsys.com>, apreq-dev@httpd.apache.org,
Ken Williams <ken@mathforum.org>
Date: Mon, 23 Dec 2002 17:22:34 -0800
Gnus-Warning: This is a duplicate of message <2DF5365C-16DE-11D7-8439-0003931A964A@wheeler.net>
Gnus-Warning: Multipart MIME detected
On Monday, December 23, 2002, at 05:02 PM, Stas Bekman wrote:
>> I agree that it should work, but unfortunately, it doesn't. Neither
>> do these. :-( What does work is if I put in the full path.
>
> FWIW, we use FindBin in mod_perl 2.0 to resolve this problem.
>
> use FindBin;
> use lib map "$FindBin::Bin/$_",
> qw(../Apache-Test/lib ../lib ../../lib);
I agree that that's a good approach. I enclose a patch implementing
this change. I've tested it and it works fine.
Regards,
David
--
David Wheeler AIM: dwTheory
david@wheeler.net ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: Theory@jabber.org
[2. application/octet-stream; Makefile.PL.patch]...
--- Makefile.PL.orig Sat Dec 7 21:25:50 2002
+++ Makefile.PL Mon Dec 23 17:21:20 2002
@@ -1,9 +1,13 @@
use ExtUtils::MakeMaker;
use strict;
+use FindBin;
use 5.005;
my $Is_Win32 = ($^O eq "MSWin32") || $ENV{WIN32_TEST};
+my $conf_data = join '', <DATA>;
+$conf_data =~ s/(blib\/arch)/$FindBin::Bin\/$1/;
+
if (not $Is_Win32) {
eval {
require Apache::test;
@@ -12,7 +16,7 @@
my %params = Apache::test->get_test_params();
alarm 0;
- Apache::test->write_httpd_conf(%params, include => join '', <DATA>);
+ Apache::test->write_httpd_conf(%params, include => $conf_data);
*MY::test = sub {Apache::test->MM_test(%params)};
};
print "\n[timeout] skipping test setup...\n" if $@ eq "alarm\n";
@@ -156,7 +160,7 @@
print CONF $_;
}
close ORIG;
- print CONF $_ while (<DATA>);
+ print CONF $conf_data;
close CONF;
*MY::test = sub {
return << 'EOF';
|