Michael G Schwern wrote:
On Sat, Aug 13, 2005 at 10:33:45PM -0400, John E. Malmberg wrote:

There does not seem to be a method of explicitly closing or flushing the
output stream being written to by Test::Builder.

Any ideas on how to resolve this?

I can change the test to write to a tied filehandle or I can make sure the
new Test::Builder object which outputs to some_file is destroyed before I
read from some_file.  The later has the nice side effect of testing that
destroying a Test::Builder object closes any open filehandles.

Try the attached patch and let me know.

The patch seems to work fine on my system, and I do not even need to use the feature logical for sharing the file.

EAGLE> mcr []Perl. "-I[-.lib]" [-.lib.test.simple.t]create.t
1..8
ok 1 - The object isa Test::Builder
ok 2 - create does not interfere with ->builder
ok 3 -        does not interfere with ->new
ok 4 - The object isa Test::Builder
ok 5 - Test::Builder->create makes a new object
ok 6 - Changing output() of new TB doesn't interfere with singleton
ok 7
ok 8

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to