in reply to Can Test::MockObject mock a file?
Test::MockFile::FileHandle exists. Also, file handles can be "mocked" using tie and implementing a null file handle interface, if one doesn't exist. See perltie on this. File::Temp is also used extensively in testing scenarios, as mentioned already.