Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 57080 invoked from network); 7 Mar 2008 18:28:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2008 18:28:01 -0000 Received: (qmail 29245 invoked by uid 500); 7 Mar 2008 18:27:52 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 29227 invoked by uid 500); 7 Mar 2008 18:27:52 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 29216 invoked by uid 99); 7 Mar 2008 18:27:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 10:27:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pwood@christianbook.com designates 4.17.160.157 as permitted sender) Received: from [4.17.160.157] (HELO dmzpostal.cckh.com) (4.17.160.157) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 18:27:16 +0000 Received: from raptor.cbdadmin.com (firewall-cp.cckh.com [4.17.160.129]) by dmzpostal.cckh.com (8.12.8/8.12.8) with ESMTP id m27INeTt012039; Fri, 7 Mar 2008 13:23:41 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Modify output of Apache::PerlRun? Date: Fri, 7 Mar 2008 13:27:23 -0500 Message-ID: In-Reply-To: <66887a3d0803041712k20460ac9od04b3fbaa7a0fc24@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Modify output of Apache::PerlRun? Thread-Index: Ach+Xg1TsIA3IH5nRVSQP9rzX7yKwgCIa+aA From: "Peter Wood" To: "Perrin Harkins" Cc: X-Virus-Checked: Checked by ClamAV on apache.org 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 tag at the top of the page being removed. This happens even if my filter is totally benign: sub handler { my $r =3D shift->filter_register; my $fh =3D $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: pharkins@gmail.com [mailto:pharkins@gmail.com] On=20 > 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? >=20 >=20 > On Thu, Feb 28, 2008 at 9:33 AM, Peter Wood=20 > wrote: > > I'm running Apache 1.3.28 and mod_perl 1.27. I have quite=20 > a few Perl=20 > > CGI scripts that run via Apache::PerlRun and product HTML=20 > output. I'd=20 > > like to be able to modify the HTML output of these scripts=20 > after they=20 > > finish running, so as to insert some HTML code on a=20 > site-wide basis=20 > > without having to modify each individual script. >=20 > I'd suggest you look at Apache::Filter. It should be able to=20 > do this for you. >=20 > - Perrin >=20