stas 2003/03/27 20:13:14
Modified: perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
Log:
- don't LoadModule mod_perl.so when it wasn't built against the used
version of perl
- prepare some comments for the future handling of static builds and
automatic mod_perl 1.0 so location
Revision Changes Path
1.67 +19 -6
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
Index: TestConfigPerl.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- TestConfigPerl.pm 20 Mar 2003 14:06:04 -0000 1.66
+++ TestConfigPerl.pm 28 Mar 2003 04:13:14 -0000 1.67
@@ -17,19 +17,32 @@
my $server = $self->{server};
my $libname = $server->version_of(\%libmodperl);
+ my $vars = $self->{vars};
if ($server->{rev} >= 2) {
if (my $build_config = $self->modperl_build_config()) {
- $libname = $build_config->{MODPERL_LIB_SHARED}
+ $libname = $build_config->{MODPERL_LIB_SHARED};
+ }
+ else {
+ # XXX: can we test whether mod_perl was linked statically
+ # so we don't need to preload it
+ # if (!linked statically) {
+ # die "can't find mod_perl built for perl version $]"
+ # }
+ error "can't find mod_perl.so built for perl version $]";
}
+ # don't use find_apache_module or we may end up with the wrong
+ # shared object, built against different perl
+ }
+ else {
+ # mod_perl 1.0
+ $vars->{libmodperl} ||= $self->find_apache_module($libname);
+ # XXX: how do we find out whether we have a static or dynamic
+ # mod_perl build? die if its dynamic and can't find the module
}
-
- my $vars = $self->{vars};
-
- $vars->{libmodperl} ||= $self->find_apache_module($libname);
my $cfg = '';
- if (-e $vars->{libmodperl}) {
+ if (exists $vars->{libmodperl} && -e $vars->{libmodperl}) {
if (Apache::TestConfig::WIN32) {
my $lib = "$Config{installbin}\\$Config{libperl}";
$lib =~ s/lib$/dll/;