in reply to Mocking files for reading

Is there already a module which does this job?

As far as I know, no.

Is the module I have written worth putting on CPAN?

Absolutely, and the name is right, too.

I was able to mock files only for reading. Because I cannot override the print builtin.

You can if you use a tied variable. You want to look at the PRINT routine in perltie for inspiration. Test::Output::Tie may be of some use as well.

• another intruder with the mooring in the heart of the Perl