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

Re: New feature proposal : <<>> to disable magic open of ARGV

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 25, 2014 02:58
Subject:
Re: New feature proposal : <<>> to disable magic open of ARGV
Message ID:
CALJW-qHWJZ9HRLsUwKMbQJA2AFFE2KFXvFsGn_kNmZ_deVUwJA@mail.gmail.com
On Thu, Jul 24, 2014 at 4:23 PM, Rafael Garcia-Suarez <rgs@consttype.org>
wrote:

> On 24 July 2014 22:20, Eric Brine <ikegami@adaelis.com> wrote:
> > The goal is to change the behaviour of reading from ARGV, not <>.
>
> Same thing. <> is exactly equivalent to <ARGV>. Actually the lexer
> transforms <> into <ARGV> even before it gets to the parser.
>
> > Unless <<>> is short for <NOTARGV>, this seems like a broken design.
>  What
> > happens if someone uses readline(), read() or sysread() on ARGV?
>
> Easy, readline is the same as <>, read and sysread bypass magic
> entirely. Nothing new here.
>

Then I retract my comment.

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