home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 April / PCO0499.ISO / filesbbs / os2 / apach134.arj / APACH134.ZIP / src / helpers / MakeLint < prev    next >
Encoding:
Text File  |  1997-08-19  |  702 b   |  32 lines

  1. #!perl
  2.  
  3. # Create a Configuration.lint with every Module except for the modules
  4. # specified in the 'isbad' subroutine.
  5.  
  6. sub isbad
  7. {
  8.     local($module) = @_;
  9.     return 1 if $module =~ /mod_dld/;
  10.     return 1 if $module =~ /mod_dld/;
  11.     return 1 if $module =~ /mod_auth_msql/;
  12.     return 1 if $module =~ /mod_example/;
  13.  
  14.     return 0;
  15. }
  16.  
  17. open(TMPL, "Configuration.tmpl") || die "can't open Configuration.tmpl: $!";
  18. open(LINT, ">Configuration.lint") || die "can't write Configuration.link: $!";
  19.  
  20. while(<TMPL>)
  21. {
  22.     next if /^$/;
  23.     print LINT if /^[^#]/;
  24.     if(/^# AddModule\s+(.*)$/)
  25.     {
  26.        $module = $1;
  27.        print LINT "AddModule $module\n" if ! &isbad($module);
  28.     }
  29. }
  30. close(TMPL);
  31. close(LINT);
  32.