Title: RE: Testing output to STDOUT and STDERR

> Though, I must say that I prefer his API.  The above was really just a
> quick hack based on what I'd extracted out of the ePerl code base.
>
> I'd call it something like IO::Capture if I were to CPAN it.
> IO::Seize isn't quite right, but "seize" is definitely a good Perlish
> name for the function.
>
> Note that php has a built-in function to do just this.

Its worth noting that this approach wont actually grab everything on the tied filehandles.  There are enough ways to bypass the tie that you have to do a lot more than that to get the majority, and even then there is stuff that will still bypass it.

Its very annoying actually that there isnt a reliable and clean way to intercept STDOUT/STDERR properly. (IMO)

Yves




Reply via email to