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

Re: I/O layers and magic <ARGV>

Thread Previous
From:
Tom Christiansen
Date:
February 27, 2011 08:51
Subject:
Re: I/O layers and magic <ARGV>
Message ID:
17638.1298825501@chthon
>2011-02-27 kl. 17.10 skrev Tom Christiansen:
>>> open:: does its magic during compile time. It stores stuff in
>>> the hints hash.
>> 
>> I know.  I've looked at it.  A lot.  That's why I asked.

>It works for me if the open::->import happens inside a BEGIN
>at the start of the file.  

Oh.  I was thinking that the problem with the import was that it was only
into the lexical scope, which would expire at the end of the block.  This
is the problem with trying to do *any* (normal) pragma in any sort of if
block or even eval.

> (That is for ARGV.  open.pm's handling of STDIN/STDOUT/STDERR is
> broken in other ways: it never modifies the crlf-ness.)

I see.  Thanks.

--tom

Thread Previous


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