NAME
Test::Trap::Builder::SystemSafe - Output layer backend using File::Temp
VERSION
Version 0.0.5
DESCRIPTION
This module provides an implementation systemsafe, based on File::Temp, for the trap's output layers. This implementation insists on reopening the output file handles with the same descriptors, and therefore, unlike Test::Trap::Builder::TempFile and Test::Trap::Builder::PerlIO, is able to trap output from forked-off processes, including system().
See also Test::Trap (:stdout and :stderr) and Test::Trap::Builder (output_layer).
CAVEATS
Using File::Temp, we need privileges to create tempfiles.
We need disk space for the output of every trap (it should clean up after the trap is sprung).
Disk access may be slow -- certainly compared to the in-memory files of PerlIO.
If the file handle is on an in-memory file, it won't be availible to other processes in any case, so we get an exception instead.
If there is another file handle with the same descriptor (f ex after an open OTHER, '>&=', THIS
), we can't get that file descriptor, and we get an exception instead.
Threads? No idea. It might even work correctly.
BUGS
Please report any bugs or feature requests directly to the author.
AUTHOR
Eirik Berg Hanssen, <ebhanssen@allverden.no>
COPYRIGHT & LICENSE
Copyright 2006 Eirik Berg Hanssen, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.