httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [ANNOUNCE] Apache::Test 1.08 RC1
Date Tue, 24 Feb 2004 19:29:21 GMT
Geoffrey Young wrote:
> 
> Stas Bekman wrote:
> 
>>We would like to release Apache::Test 1.08. It includes multiple changes
>>and improvements, therefore we need your help to test it and report any
>>problems you may have noticed.
>>
>>http://apache.org/~stas/Apache-Test-1.08-dev.tar.gz
> 
> 
> I'm getting a strange error from 5.6.1 where no mod_perl is installed.
> 
> $ /perl/perl-5.6.1/bin/perl Makefile.PL -apxs
> /apache/2.1/prefork/noperl/bin/apxs
> Useless use of a constant in void context at
> Apache-Test/lib/Apache/TestRun.pm line 1196.
> 
> strangely, the attached patch fixes things.
> 
> --Geoff
> 
> 
> ------------------------------------------------------------------------
> 
> Index: Apache-Test/lib/Apache/TestRun.pm
> ===================================================================
> RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
> retrieving revision 1.152
> diff -u -r1.152 TestRun.pm
> --- Apache-Test/lib/Apache/TestRun.pm	19 Feb 2004 19:52:52 -0000	1.152
> +++ Apache-Test/lib/Apache/TestRun.pm	24 Feb 2004 17:04:15 -0000
> @@ -1193,7 +1193,8 @@
>  
>      # mod_perl 2.0 build always knows the right httpd location (and
>      # optionally apxs)
> -    $vars_must_overriden++ if Apache::TestConfig::IS_MOD_PERL_2_BUILD();
> +    my $mp2 =  Apache::TestConfig::IS_MOD_PERL_2_BUILD();
> +    $vars_must_overriden++ if $mp2;
>  
>      unless ($vars_must_overriden) {
>          for (@data_vars_must) {

For some reason perl doesn't like undef constants at compile time. You can 
reproduce the problem with:

   use constant IS_MOD_PERL_2 => undef;

This fixes the source of the problem. Now committed.

I'll try to write a pure perl test case and bounce of p5p.

Index: lib/Apache/TestConfig.pm
===================================================================
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.210
diff -u -r1.210 TestConfig.pm
--- lib/Apache/TestConfig.pm    21 Feb 2004 20:28:47 -0000      1.210
+++ lib/Apache/TestConfig.pm    24 Feb 2004 19:26:29 -0000
@@ -12,7 +12,7 @@
  use constant DEFAULT_PORT => 8529;

  use constant IS_MOD_PERL_2       =>
-    eval { require mod_perl } && $mod_perl::VERSION >= 1.99;
+    eval { require mod_perl && $mod_perl::VERSION >= 1.99 } || 0;

  use constant IS_MOD_PERL_2_BUILD => IS_MOD_PERL_2 &&
      require Apache::Build && Apache::Build::IS_MOD_PERL_BUILD();

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message