Front page | perl.perl5.porters |
Postings from November 2000
Re: PerlIO - what next ?
Thread Previous
|
Thread Next
From:
Benjamin Stuhl
Date:
November 8, 2000 10:46
Subject:
Re: PerlIO - what next ?
Message ID:
20001108184624.8827.qmail@web6301.mail.yahoo.com
--- Nick Ing-Simmons <nik@tiuk.ti.com> wrote:
>
> Now that perlio is in the mainline I _really_ need to
> know
> what to do next in terms of making it useful.
>
> This means knowing what it "should" look like to perl5:
>
> Do you want getc($fh) return character or a byte
> depending on the handle's
> top "layer" ?
Yes, taking into account what the top layer gor from
below...
> Likewise does
>
> $count = read($fh,$buffer,10);
>
> read 10 chars or 10 bytes depending on mode ?
Chars.
> How do you want I open a file which is utf8 or shift-jis
> or whatever?
open my $fh, "< :shift-jis JapaneseTextFile" or die $!;
> What should "binmode" mean now we have layers?
binmode $fh, "+:utf8"; # means "push the :utf8 layer"
How should one remove layers?
'binmode $fh, "-"' anyone?
-- BKS
P.S. PerlIO really has enough separate components it might
be worth putting it into its own subdirectory. It also
might be worth making perlio.h not just be '#include
"iperlsys.h"'. I'm starting to look at porting PerlIO to
Win32 and it would be much easier if each layer was its own
source file (keeps me from having to create an #ifdef WIN32 morass).
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
Thread Previous
|
Thread Next