On Mon, Jul 15, 2002 at 12:16:29AM -0400, Melvin Smith wrote:
> 2) Filters (or IO disciplines) - People have different opinions on what 
> these
> even mean. To me it means a "layer" that can be pushed onto an IO stack
> that may filter or transform the data and/or perform opaque actions, while
> representing the IO handle as a standard stream with a standard API.
> Also think about how IO layers can be implemented completely in Parrot.

Can we learn from the PerlIO system that 5.8 is about to give to the world?
You can write this in C (and it is mostly C, not XS), or in perl.
I can't comment on what they are like to write in perl, but they're not
that hard to write in C.

The two I've written (on a CPAN mirror near you) are PerlIO::gzip (does
gzip compression and decompression), and PerlIO::subfile (treats a section
of a file as if it is a whole file - lets you read direct from a tar on an
uncompressed file stored in a zip file)

<plug>
The latter got written so that ex::lib::zip (zip files in @INC) could cope
with files stored but not compressed in zip files.
</plug>

Nicholas Clark
-- 
Even better than the real thing:        http://nms-cgi.sourceforge.net/

Reply via email to