Em Wed, Sep 25, 2002 at 10:40:53AM -0700, Eugene Eric Kim escreveu: > format of the macros in include/ap_release.h between 2.0.40 and 2.0.42. > AP_SERVER_BASEREVISION is now: > > #define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL > > instead of simply: > > #define AP_SERVER_BASEREVISION "2.0.42" > > This breaks the httpd_version method in Apache/Build.pm.
Try this patch, is what I'm using here: --- mod_perl-1.99_05/lib/Apache/Build.pm.orig 2002-09-19 18:44:56.000000000 -0300 +++ mod_perl-1.99_05/lib/Apache/Build.pm 2002-09-19 18:46:32.000000000 -0300 @@ -740,14 +740,17 @@ return undef; }; - my $version; + my ($version,$maj,$min,$pat); while(<$fh>) { - next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/; - $version = $1; - last; + $maj = $1 if /^#define\s+AP_SERVER_MAJORVERSION\s+\"(.*)\"/; + $min = $1 if /^#define\s+AP_SERVER_MINORVERSION\s+\"(.*)\"/; + $pat = $1 if /^#define\s+AP_SERVER_PATCHLEVEL\s+\"(.*)\"/; + $maj && $min && $pat && last; } + $version = "$maj.$min.$pat"; + close $fh; $self->httpd_version_cache($dir, $version);