Subject: | removal of temporary files |
After the trap has sprung, temporary files are left behind. They will be
removed by File::Temp when the process terminates but in the mean time
they persist. This is problematic in test scripts attempting to test
that temporary files are not left behind.
This is easily fixed by unlinking $file in the Teardown sub after
closing $fh. With this change, after the trap is sprung, the temporary
files are gone. Of course, I am assuming the file isn't used after the
Teardown sub has closed the file handle.