in reply to Re: Test::Harness not working on my machine
in thread Test::Harness not working on my machine
re compatible: how about using the fancy Openxxx modules instead of the open| syntax? That is, you can use the list form of system() and arrange to have its standard output file handle piped to something you can read from.
Hmm, the list form of system() already has platform-specific code for dealing with the arguments. It bypasses the shell and doesn't have to re-assemble them on UNIX I beleive, and on Windows it knows to put quotes around every individual argument before concatenating it together to form the command tail.
Basically, using the no-shell form prevents the need for shell escapes, but there is still a portability issue of keeping the arguments separate (which already works fine).
Also, what's wrong with using the list form of open in 5.8, and concatenating the list together for 5.6 or older? Just a line or two difference, easy to check the Perl version in an if() statement.
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Test::Harness not working on my machine
by schwern (Scribe) on Apr 05, 2003 at 04:04 UTC |