develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [PATCH] [DOCS] Modernize perlopentut.pod

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
July 20, 2011 07:55
Subject:
Re: [PATCH] [DOCS] Modernize perlopentut.pod
Message ID:
20110720145529.GD16631@klangraum.plasmasturm.org
* Tom Christiansen <tchrist@perl.com> [2011-07-20 08:55]:
> >* David Golden <xdaveg@gmail.com> [2011-07-18 22:40]:
> >> As Tom points out, there is no problem with 2-arg open if
> >> *you* control all the arguments and know what you're doing.
> >> The rationale for 3-arg open is (IMO) that it's less
> >> error-prone.
>
> >2-arg open is also useful when you don’t *want* to control all
> >inputs, such as giving a caller the option to ask for
> >transparent decompression by piping from zcat instead of
> >reading from a file.
>
> No, two-arg open is perfectly fine here:
>
>     open(STDOUT, "> /dev/null")

Where did you get the idea I said anything to the contrary?

The conversation focussed entirely on how 2-arg open is fine
provided care is taken. I was missing any mention of how the
magic is not merely a potential pitfall, is in fact sometimes
desirable, a feature.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About