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/apaci load_modules.pl.PL
Date Thu, 23 May 2002 17:56:57 GMT
dougm       02/05/23 10:56:56

  Modified:    apaci    load_modules.pl.PL
  Log:
  prevent duplicate LoadModules
  
  Revision  Changes    Path
  1.5       +4 -2      modperl/apaci/load_modules.pl.PL
  
  Index: load_modules.pl.PL
  ===================================================================
  RCS file: /home/cvs/modperl/apaci/load_modules.pl.PL,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- load_modules.pl.PL	25 Mar 2002 00:16:20 -0000	1.4
  +++ load_modules.pl.PL	23 May 2002 17:56:56 -0000	1.5
  @@ -44,11 +44,13 @@
   
   my($perl_mod) = grep /perl/, @sh_mods;
   unshift @sh_mods, $perl_mod; #must come before mod_include/USE_PERL_SSI
  -  
  +
  +my %seen;
  +
   local *FH;
   open FH, ">$LoadModule_conf" or
       die "can't open $LoadModule_conf $!";
  -print FH join "\n", @sh_mods, "";
  +print FH join "\n", (grep { !$seen{$_}++ } @sh_mods), "";
   close FH;
   
   system "cat $LoadModule_conf $orig > $tmp && mv $tmp $orig";
  
  
  

Mime
View raw message