Thanks for this.
I think I have a better understanding now.
Your code worked straight away and the test was successful. The significant difference as far as I can see was that the original code in my sub just opened a file/filehandle but never closed it - this was being done by another subroutine. I think this was why the cleanup process failed. If I close the file/filehandle (or call the subroutine that does this from the test script) the test passes and the directories created by the test are all cleaned up.
Many thanks for all your efforts.
In reply to Re^2: Unit test - check file created using test::directory
by APGRMF
in thread Unit test - check file created using test::directory
by APGRMF
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |