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
In reply to Re: Mocking files for reading
by grinder
in thread Mocking files for reading
by mayaTheCat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |