httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [win32] Makefile.PL fixes
Date Fri, 02 May 2003 05:30:58 GMT
Randy Kobes wrote:
> For running the apreq-1 tests, there's a couple of
> things that should be done in case the user has set
> the APACHE environment variable, so as to put it
> into a form that Apache::Test (and friends) expects.
> The following patch does this:

why won't \\ work? Does it work if you do:

perl Makefile.PL -httpd C:\\path\\to\\apache

In any case it's probably simpler to:

if (WIN32 and exists $ENV{APACHE}) {
   $ENV{APACHE} =~ s!\\!/!g;
   push @ARGV, '-httpd', $ENV{APACHE};
}

somewhere on the top... before Apache::TestMM::filter_args(); is called.

> =====================================================
> Index: Makefile.PL
> ===================================================================
> RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
> retrieving revision 1.23
> diff -u -r1.23 Makefile.PL
> --- Makefile.PL	1 May 2003 00:07:32 -0000	1.23
> +++ Makefile.PL	2 May 2003 05:14:34 -0000
> @@ -132,6 +132,7 @@
>  }
>  
>  sub win32_setup {
> +  require Win32;
>    my $apache;
>    unless ($ENV{APACHE}) {
>    SEARCH: {
> @@ -156,15 +157,17 @@
>      my $vers = qx{"$apache" -v};
>      die qq{"$apache" does not appear to be version 1.3}
>        unless $vers =~ m!Apache/1.3!;
> -    $ENV{APACHE} = $apache;
>    }
> +  $apache ||= $ENV{APACHE};
> +  $apache = Win32::GetShortPathName($apache);
> +  $apache =~ s!\\!/!g;
>    my $test = 't/TEST.PL';
>    my $orig = $test . '.orig';
>    rename($test, $orig) unless -e $orig;
>    open(ORIG, $orig) or die "Cannot open $orig: $!";
>    open(NEW, ">$test") or die "Cannot open $test: $!";
>    while (<ORIG>) {
> -    s/(use warnings.*)/$1\n\n\$ENV{APACHE} = "$apache";/;
> +    s/(use warnings.*)/$1\n\n\$ENV{APACHE} = '$apache';/;
>      print NEW $_;
>    }
>    close ORIG;
> =============================================================
> 


-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message