You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2004/02/24 02:00:09 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm

stas        2004/02/23 17:00:09

  Modified:    perl-framework/Apache-Test/lib/Apache TestServer.pm
  Log:
  $self->{config}->{vars}->{defines} is not always defined
  
  Revision  Changes    Path
  1.76      +5 -1      httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm
  
  Index: TestServer.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -u -r1.75 -r1.76
  --- TestServer.pm	20 Feb 2004 23:51:54 -0000	1.75
  +++ TestServer.pm	24 Feb 2004 01:00:09 -0000	1.76
  @@ -81,6 +81,8 @@
   }
   
   sub config_defines {
  +    my $self = shift;
  +
       my @defines = ();
   
       for my $item (qw(useithreads)) {
  @@ -88,7 +90,9 @@
           push @defines, "-DPERL_\U$item";
       }
   
  -    push @defines, map { "-D$_" } split " ", shift->{config}->{vars}->{defines};
  +    if (my $defines = $self->{config}->{vars}->{defines}) {
  +        push @defines, map { "-D$_" } split " ", $defines;
  +    }
   
       "@defines";
   }
  
  
  

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>   sub config_defines {
>>  +    my $self = shift;
>>  +
>>       my @defines = ();
>>   
>>       for my $item (qw(useithreads)) {
>>  @@ -88,7 +90,9 @@
>>           push @defines, "-DPERL_\U$item";
>>       }
>>   
>>  -    push @defines, map { "-D$_" } split " ", shift->{config}->{vars}->{defines};
>>  +    if (my $defines = $self->{config}->{vars}->{defines}) {
>>  +        push @defines, map { "-D$_" } split " ", $defines;
>>  +    }
>>   
>>       "@defines";
>>   }
> 
> 
> were you seeing specific undef warnings?  I ran it with and without the
> -defines option and didn't run across anything.  was there a specific case
> where {vars}->{defines} wasn't initalized properly in the constructor (like
> t/SMOKE or something)?

Yup, t/SMOKE was the one. It needs more polishing, but for now this fix was 
neded to get it running.

__________________________________________________________________
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

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestServer.pm

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>    sub config_defines {
>   +    my $self = shift;
>   +
>        my @defines = ();
>    
>        for my $item (qw(useithreads)) {
>   @@ -88,7 +90,9 @@
>            push @defines, "-DPERL_\U$item";
>        }
>    
>   -    push @defines, map { "-D$_" } split " ", shift->{config}->{vars}->{defines};
>   +    if (my $defines = $self->{config}->{vars}->{defines}) {
>   +        push @defines, map { "-D$_" } split " ", $defines;
>   +    }
>    
>        "@defines";
>    }

were you seeing specific undef warnings?  I ran it with and without the
-defines option and didn't run across anything.  was there a specific case
where {vars}->{defines} wasn't initalized properly in the constructor (like
t/SMOKE or something)?

--Geoff