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

Re: [ID 20010703.002] [5.6.2-to-be] PerlIO is EVIL

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
July 6, 2001 05:46
Subject:
Re: [ID 20010703.002] [5.6.2-to-be] PerlIO is EVIL
Message ID:
20010706133523.1279.6@bactrian.ni-s.u-net.com
Ilya Zakharevich <ilya@math.ohio-state.edu> writes:
>On Tue, Jul 03, 2001 at 11:20:42AM +0200, Konovalov, Vadim Vladimirovich (Vadim) wrote:
>> I've reported similar thoughts a couple of months ago - see attached message.
>> 
>> Additionally, there are several places where local temporary variables assigned just to make further assignment less verbose. ("buf" in PerlIOStdio_read function is an example).
>> 
>> IMHO while idea of perlio.c is good, and it allows cool things, it's implementation could be cleaned greatly.
>
>Obviously, doing CRLF in Perl when CRTL supports it already is not a
>good idea.  

Try stepping through Borland C CRTL version and see if you still agree...
Also note that win32/*.c has ActiveState re-implemtation of parts of MSVC's
read() because there are bugs in MS's DLL. 

>What CRLF discipline should do on such an architecture is
>set_mode(whatever) on the corresponding FD (with appropriate
>flush()ing, of course), and store the info in the flag.  That's all.
>
>And the current state of FD should have been queried when PerlIO is
>created (may be this is done already?).

Querying the state needs Configure-oid probing to see how the CRTL flags 
that state. There isn't a clean API. Switching modes other than 
just-after-open is not reliable on most CRTLs.

>
>Ilya
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


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