I haven't tried Directory::Scratch, but it looks pretty nice. It's specifically written to handle cross-platform issues with temporary test files. From Directory::Scratch:
When writing test suites for modules that operate on files, it's often inconvenient to correctly create a platform-independent temporary storage space, manipulate files inside it, then clean it up when the test exits. /.../ This module aims to eliminate that problem by making it easy to do things right.It may be overkill if you only want to create only one file though.
lodin
In reply to Re: temporary files in .t scripts (Directory::Scratch)
by lodin
in thread temporary files in .t scripts
by esobchenko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |