Looks to me like the docs of Test.pm need to be improved. If you look into the source you can see that the module makes a reference to the STDOUT as soon as it's used and then prints to that reference.
Anyway it seems that all you need to do is this:
to redirect the output andopen $Test::TESTOUT, '>', $stdout;
to switch it back.close $Test::TESTOUT; $Test::TESTOUT=*STDOUT{IO};
Jenda
|
We'd like to help you learn to help yourself Look around you, all you see are sympathetic eyes Stroll around the grounds until you feel at home -- P. Simon in Mrs. Robinson |
In reply to Re: Redirecting STDOUT from internal function with 5.6.1 restrictions
by Jenda
in thread Redirecting STDOUT from internal function with 5.6.1 restrictions
by mgc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |