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 Mon, 02 Apr 2001 07:37:37 GMT
dougm       01/04/02 00:37:37

  Modified:    lib/Apache Build.pm
  Log:
  a better which()
  
  Revision  Changes    Path
  1.39      +3 -7      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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Build.pm	2001/03/28 00:28:59	1.38
  +++ Build.pm	2001/04/02 07:37:36	1.39
  @@ -5,6 +5,7 @@
   use warnings;
   use Config;
   use Cwd ();
  +use File::Spec ();
   use ExtUtils::Embed ();
   use ModPerl::Code ();
   use ModPerl::BuildOptions ();
  @@ -66,14 +67,9 @@
   }
   
   sub which {
  -    my $name = shift;
  -
  -    for (split ':', $ENV{PATH}) {
  -        my $app = "$_/$name";
  -        return $app if -x $app;
  +    foreach (map { File::Spec->catfile($_, $_[0]) } File::Spec->path) {
  +	return $_ if -x;
       }
  -
  -    return '';
   }
   
   #--- Perl Config stuff ---
  
  
  

Mime
View raw message