At ApacheCon this year Geoff gave a talk about Output filters (slides: =
rintable.pdf.gz) which included a sample handler that ran the manual =
through HTML::Clean. a big part of the code in the filter was to handle =
the possibility of having split tags and that subsequently making =
HTML::Clean not play nice. =20

Philippe gave a talk about Profiling and Instrumenting (slides: = in which a =
comment came up about using Filters to insert page generation metrics =
into the body of the page the metrics were about. This kind of filter =
too would have to handle the split tags problem.

So it occurred to me that this might well be handled by subclassing =
Apache2::Filter and making the subclass handle it. So after a bunch of =
screwing around I finally got a pretty much working version.

An example is running here:

It's running the manual through a filter that injects '!!' at the end of =
each read call, basically just illustrating that it's actually working.

code here:=20


What constitutes a 'tag' is user defined. it just takes a regexp that =
defines an incomplete tag, the default being '(<[^>]*)$'.

It only works with the stream filter API right now. I haven't read any =
of the bucket brigade documentation, but I assume that this idea could =
also be applied to that API as well.

I'm not sure if i'm doing anything really weird or really wrong here, so =
any and all comments are welcome.