On Mon, Feb 07, 2005 at 12:46:51PM -0800, Jim Keenan wrote: > Using the standard Test::More framework, is it > possible to test whether what was printed to a > filehandle matches a predetermined string or list of > strings?
Any number of existing modules can be used which capture the output of a filehandle. IO::String, IO::Stringy and IO::Capture for example. Otherwise its pretty trivial to write your own using tied filehandles, see t/lib/TieOut.pm in the Test-Simple distribution.