develooper Front page | perl.perl5.porters | Postings from November 1999

PerlIO and filters

Thread Next
Benjamin Stuhl
November 21, 1999 13:43
PerlIO and filters
Message ID:
I have had some time this weekend to muse on the possibility of writing a 
true PerlIO, rather than simply sitting on top of whatever stdio 
implementation people have. I have come up with three main goals for any 
  1. Lightweight - the perl distribution is all ready quite big, and
     doesn't really have 1.5MB free for a heavyduty IO system
  2. Speed - it doesn't have to be the world's fastest, but it needs
     to be reasonably good
  3. Filters - the best justification I have thought of for writing
     our own IO system is to provide coherent, simple IO filtering.
     Unfortunantely, this is the hardest part, and also leads to some
     tricky questions of what call should do what (ex: how much
     physical IO is needed to get one character out at the end of the
     filters, especially with filters that produce varying amounts for
     a given input (cf. UTF-8, compression, etc.)? Should
     PerlIO_read() read filtered or unfiltered chars? What do we do if
     it is impossible to give a number of chars that matches the
     length given? and so on).

Any thoughts?

-- BKS

Get Your Private, Free Email at

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About