So, I've given Apache::Filter and Apache::PerlRunFilter (from CPAN) a
shot, and the actual filtering action seems to work as expected, except
that just before my own filter is applied, the first line of input goes
missing. This usually results in the <html> tag at the top of the page
being removed. This happens even if my filter is totally benign:

sub handler {
    my $r = shift->filter_register;
    my $fh = $r->filter_input();
    while (<$fh>) {
        print $line;
    }
}

I've emailed the maintainer of the module, but I'm not sure of his
availability. So I'm wondering if anyone here has a suggestion.

Thanks,

Peter

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Perrin Harkins
> Sent: Tuesday, March 04, 2008 8:13 PM
> To: Peter Wood
> Cc: modperl@perl.apache.org
> Subject: Re: Modify output of Apache::PerlRun?
> 
> 
> On Thu, Feb 28, 2008 at 9:33 AM, Peter Wood 
> <[EMAIL PROTECTED]> wrote:
> >  I'm running Apache 1.3.28 and mod_perl 1.27. I have quite 
> a few Perl 
> > CGI  scripts that run via Apache::PerlRun and product HTML 
> output. I'd 
> > like  to be able to modify the HTML output of these scripts 
> after they 
> > finish  running, so as to insert some HTML code on a 
> site-wide basis 
> > without  having to modify each individual script.
> 
> I'd suggest you look at Apache::Filter.  It should be able to 
> do this for you.
> 
> - Perrin
> 

Reply via email to