I had lots of trouble getting IPC::Run to work well on Win32; if it worked well there, I'd recommend it for this application.

If anyone knows how, in Perl, to open up to 3 pipes and then use WaitForMultipleObjects() on the ends the parent process reads & writes, please let me know. That's the most likely way to get anything like this working on Win32.

- Barrie

Michael G Schwern wrote:
demerphq wrote:
I found that the suggested code for saving and restoring STDOUT and
STDERR given in "perldoc -f open" seems to work OK.  This is essentially
what IPC::Run3 is doing -- capturing to an external file and then
reading it back in and making it available.
Yeah, but thats a can of worms in of itself. Using backticks is
simple, and requires no special stuff. If you dont mind blocking until
the other process completes,  I see no reason to use another more
complex approach.

We do mind blocking until the other process (ie. the test) completes.  Otherwise you 
don't get that nice "30/309 tests" progress counter.

I'm surprised simply tying STDOUT and STDERR doesn't work...  Well, its 
testable.

Talk with the CPANPLUS guys.  They had to solve this problem I believe.  Some 
combination of IPC::Run, IPC::Run3 and IPC::Open3 should do it.

Something to consider in all this is that TAPx::Parser needs to know to display 
what goes to STDERR and suppress what goes to STDOUT.  This means you simply 
can't mash the two streams together, you have to read them separately and get 
the order right.  This is Hard and one of the reasons Test::Harness just leaves 
STDERR alone.

Once again, you will probably be best served by just leaving STDERR alone and 
working on a real TAP diagnostic syntax.

Reply via email to