On Tue, Nov 9, 2010 at 4:28 PM, Tom Christiansen <tchr...@perl.com> wrote:
> I nearly always use lexical handles in non-trivial programs, although in
> trust I seldom do so in trivial ones.  By trivial, I mean those that don't
> even have subroutines, or very few.

I'm pretty sure everyone on this list is able to make such judgment,
but what about the novices? I'd rather have them default to using
indirect filehandles until they grok the difference.

> In particular, I don't approve of
> error checking being omitted when they get implicitly closed due to scoping
> or whatnot.

I agree with you in theory, but in practice I think it doesn't matter
most of the time: most of the time people don't check the return
values of their print() calls, making the point of checking close() a
bit moot IMHO. Also, closing a valid read-only filedescriptor can't
even generate an error AFAIK.

Leon

Reply via email to