perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [mp2] apache/subprocess on Win32
Date Wed, 04 Jun 2003 06:48:49 GMT
Hi,
   On Win32, the apache/subprocess tests fail on Win32.
This is due to the following: currently, the tests do
something like

   @argv = qw(potentially something);
   $command = catfile $target_dir, "some_script.pl";
   Apache::SubProcess::spawn_proc_prog($r, $command, \@argv);

The problem on Win32 is that $command isn't associated with Perl.
To fix this, one could do one of two things.

- create a "some_script.bat" with pl2bat, use
   $command = catfile $target_dir, "some_script.bat";
and insert a
   $r->subprocess_env->set(PATH => $Config{bin});
before invoking the script.

- use
    $command = $Config{perlpath}; # or perhaps better $^X
    @list = ("some_script.pl", @argv);
    Apache::SubProcess::spawn_proc_prog($r, $command, \@list);
(the potentially nicer looking
    $command = "$Config{perlpath} some_script.pl";
    Apache::SubProcess::spawn_proc_prog($r, $command, \@argv);
doesn't work - I think it interprets $command as one single
command - Win32 is famous for problems with quoting command-line
things).

Either of the above works - does anyone have a strong
preference one way or another?

Incidentally, for both, subtests 3 and 4 need
some massaging for line endings - either have
   my $value = "some text\r\n";
or use
   $output =~ s!\r!!;
Although, with perlio the :crlf filter would be
available, which would be neater ...

best regards,
randy kobes

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message