Re: authorial perlipc edit

[email protected] (Leon Timmermans) Wed, 10 Nov 2010 03:55:52 +0100
Newsgroups perl.perl5.porters,perl.documentation
Message-ID <[email protected]>
On Tue, Nov 9, 2010 at 4:28 PM, Tom Christiansen <[email protected]> wrote:
> I nearly always use lexical handles in non-trivial programs, although in
> trust I seldom do so in trivial ones. =C2=A0By 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 scopi=
ng
> 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