On Fri, 25 May 2001, barries wrote:
 
> I think that two things are necessary to enable a pure Perl
> implementation:
>    - adding is_BOS() and is_EOS() to Apache::Filter (or to
>      Apache::{Brigade,Bucket}, and

if you really need to know bos (beginning of string?) and eos, you can use
the brigade/bucket api, rather than the mod_perl read/print filter
methods.  i realize it might be tricky in the current state, since filter
handlers can be called more than once per request.

>    - allowing some kind of Perl scalar (including refs) to be passed in
>      to ap_add_xxx_filter() and then in to the handler sub.

shouldn't the filter context provide this?

> Would exposing filter->eos be sufficient for Apache::Fitler->is_EOS()?

i'd rather beef up the stream-like interface (currently
$filter->{read,print}), so filters which use that interface don't need to
know things like bos and eos.  would be cool to have seek(),
truncate() and similar stdio methods map to the brigade/bucket interface
underneath.  not to say its out of the question, but mixing methods like
is_eos() with the stdio-like/stream-like interface doesn't feel right.

> The is_BOS() would be nice for symmetry (lack of which is one of my
> beefs about both bucket brigades and filter chains as they now exist in
> apache).

if this is something that will fit in the current api, i'm sure the group
would consider adding this functionality.
 
> Providing some Perl context structure passing mechanism is a must-have,
> too, given that the same filter may be isntalled several times.

agreed.

> Providing this in the right way could also obviate the need for an XS
> level is_BOS().
> 
> Allowing Apache::Filter instance subclassing would be really nice, but
> just the above should be fine.
> 
> Do you want me to take a swipe at the above (don't want to duplicate
> work you're planning on doing)?

i have been planning todo the implementation, but if you want to beat me
to it, that's fine :)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to