Randy Kobes wrote:
> On Sun, 11 Jan 2004, Stas Bekman wrote:
>
>
>>Randy Kobes wrote:
>
> [ ... ]
>
>>>my Apache is D:\Apache2\bin\Apache.exe, which would
>>>get reported as d:\apache2\bin\apache.exe. If there isn't
>>>an easy way to preserve the case yet still remove such
>>>duplicates, I'll do that - it's not a big deal.
>>
>>Randy, you are the expert on win32 ;) I have no idea what
>>method to use to get a consistent case on case-insenstive
>>file systems. Really I think it's time to extend
>>File::Spec to handle that and not solve this problem every
>>time we need to read a filename.
>
>
> This is an annoyance, for sure ... However, in a sense we
> (Apache-Test) have some control over this problem. In
> another section we're looking for 'Apache', and then in
> TestRun.pm we also look for 'apache'. So both get reported
> as being present. However, on Win32, looking for 'apache' is
> somewhat misleading, as the default installation (either
> binary or source) results in 'Apache'. What about the
> following:
> ============================================================
> Index: lib/Apache/TestRun.pm
> ===================================================================
> RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
> retrieving revision 1.138
> diff -u -r1.138 TestRun.pm
> --- lib/Apache/TestRun.pm 11 Jan 2004 15:25:12 -0000 1.138
> +++ lib/Apache/TestRun.pm 13 Jan 2004 14:36:41 -0000
> @@ -1343,11 +1343,13 @@
>
> {
> my %choices = ();
> + my @tries = Apache::TestConfig::WIN32 ?
> + qw(Apache httpd Apache2 httpd2) :
> + qw(apache httpd apache2 httpd2);
better less dups, and comments are helpful too ;)
my @tries = qw(httpd httpd2);
# win32 has Apache and Apache2 and not apache and apache2
push @tries, WIN32 ? qw(Apache Apache2) : qw(apache apache2);
> for (grep defined $_,
> map({ catfile $vars->{$_}, $vars->{target} } qw(sbindir bindir)),
> $test_config->default_httpd, which($vars->{target}),
> - $ENV{APACHE}, which('apache'), which('httpd'),
> - $ENV{APACHE2}, which('apache2'), which('httpd2')) {
> + $ENV{APACHE}, $ENV{APACHE2}, map {which($_)} @tries) {
> $choices{$_}++ if -e $_ && -x _;
otherwise +1
__________________________________________________________________
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
|