|
|
| Do you know where your variables are? | |
| PerlMonks |
Re^2: How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?by Aristotle (Chancellor) |
| on Jan 13, 2007 at 23:51 UTC ( #594579=note: print w/ replies, xml ) | Need Help?? |
|
And that’s exactly the point: when you have an explicit close, you can make it throw an exception; when you omit the close, the error is silent. But I want to omit the close and still get an exception. Fatal won’t help me there. Thanks for the pointer about the loop device though! All I can say in retrospect is, d’uh. However, Linux has an easier way, mentioned by Zaxo in the old thread from gaal: there’s a /dev/full device where writing always fails with ENOSPC. Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||