Front page | perl.perl5.porters |
Postings from March 2000
RE: Source filters
Thread Previous
|
Thread Next
From:
Moore, Paul
Date:
March 24, 2000 07:32
Subject:
RE: Source filters
Message ID:
714DFA46B9BBD0119CD000805FC1F53BDC3A6A@UKRUX002.rundc.uk.origin-it.com
From: Gurusamy Sarathy [mailto:gsar@ActiveState.com]
>
> It needs a more complete patch than that. See below.
Oooh. I'd never have got that...
> >introduced, for byteloader). Maybe the filter module needs
> >something in the API to request binmode or textmode input
> >of the script (with textmode the default, as I expect the
> >majority of filters will be text-based).
>
> I disagree. See ByteLoader. It would be the job of the
> particular filter implementation to know whether it wants
> to filter "text" or "binary" input, and behave accordingly.
>
> I think Filter::Util::Call could use some convenience switches
> to do s/\r$// in filter_read() or ignore CRs when counting characters
> in filter_read_exact(). But I don't think it's really that big a
> portability issue if it can be clearly documented.
That's sort of what I was thinking of. But there will of necessity be a
default if the filter doesn't specify anything explicit. I would say that
should be textmode, (a) for backward compatibility, and (b) because I would
expect many of the uses of filters (particularly by the non-experts who
wouldn't necessarily have found out about a binary input switch) would be
straight text-handling.
Thanks for the patch in any case.
Paul.
Thread Previous
|
Thread Next