From: David Wheeler Subject: Re: 1.1rc2 was (Re: [Fwd: Re: [proposal/vote] OS X support]) To: Stas Bekman Cc: Joe Schaefer , apreq-dev@httpd.apache.org, Ken Williams 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 '', ; +$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 '', ); + 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 (); + print CONF $conf_data; close CONF; *MY::test = sub { return << 'EOF';