perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/lib/Apache Build.pm
Date Sun, 21 Oct 2001 05:24:52 GMT
dougm       01/10/20 22:24:52

  Modified:    lib/Apache Build.pm
  Log:
  avoid use of unintialized value
  
  Revision  Changes    Path
  1.60      +12 -2     modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- Build.pm	2001/10/21 04:47:47	1.59
  +++ Build.pm	2001/10/21 05:24:52	1.60
  @@ -707,6 +707,11 @@
     (qw(cc cpprun rm ranlib lib_ext obj_ext cccdlflags lddlflags),
      values %perl_config_pm_alias);
   
  +sub mm_replace {
  +    my $val = shift;
  +    $$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  +}
  +
   sub make_tools {
       my($self, $fh) = @_;
   
  @@ -725,8 +730,13 @@
   
       for (qw(rm_f mv ld ar)) {
           my $val = $mm->{"\U$_"};
  -        $val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  -        print $fh $self->canon_make_attr($_ => $val || $Config{$_});
  +        if ($val) {
  +            mm_replace(\$val);
  +        }
  +        else {
  +            $val = $Config{$_};
  +        }
  +        print $fh $self->canon_make_attr($_ => $val);
       }
   }
   
  
  
  

Mime
View raw message