perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Williams" <...@forum.swarthmore.edu>
Subject Re: Apache::test patch
Date Thu, 01 Feb 2001 06:30:46 GMT
Looks good to me in general.  Below are some nitpicks (I'm probably
getting notorious for these).

autarch@urth.org (Dave Rolsky) wrote:
>     print("\nFor testing purposes, please give the full path to an httpd\n",
>-	  "with mod_perl enabled.  The path defaults to \$ENV{APACHE}, if present.");
>+	  "with mod_perl enabled.  The path defaults to \$ENV{APACHE},\n",
>+	  "if present (and that binary has mod_perl).");

I kind of feel like we should blindly use $ENV{APACHE} if it's there,
because I just made up the variable for this purpose, and if the user
sets it, we shouldn't argue.  It would be mysterious if you set APACHE
to something, and then Makefile.PL defaults to use something else
without telling you why.

But I don't feel very strongly about it.

What *would* be nice, though, is to check the user-typed response for
the presence of mod_perl, and give an appropriate error message if it's
missing.


>+sub _has_mod_perl {
>+    my ($self, $httpd) = @_;
>+
>+    foreach ( `$httpd -l` )  {
>+	return 1 if /mod_perl\.c/;
>+    }

Might as well just do:

  sub _has_mod_perl {
      my ($self, $httpd) = @_;

      return 1 if `$httpd -l` =~ /mod_perl\.c/;



  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum

Mime
View raw message