That was my next thought about attacking the problem. I’d prefer being able to enable my desired behaviour with some sort of pragma somewhere and then not have to do anything special in the affected code, though. If I have to do any extra work at all (and if it’s just remembering to instantiate a particular IO class instead of just calling open), I’d rather stick to doing dumb and simple extra work than adding insufficiently magic complexity to the code.
Makeshifts last the longest.
In reply to Re^2: How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?
by Aristotle
in thread How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?
by Aristotle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |