Hi.
I am trying to write an Apache2 request filter.
According to the online tutorial
(http://perl.apache.org/docs/2.0/user/handlers/filters.html#Output_Filters). I have this
so far :
package MyFilter;
...
use base qw(Apache2::Filter);
...
use constant BUFF_LEN => 4096;
sub handler : FilterRequestHandler {
my $f = shift;
my $content = '';
while ($f->read(my $buffer, BUFF_LEN)) {
$content .= $buffer;
}
}
but when I compile this :
aw@arthur:~/tests$ perl -cw PAGELINKS.pm
Invalid CODE attribute: FilterRequestHandler at PAGELINKS.pm line 50.
BEGIN failed--compilation aborted at PAGELINKS.pm line 50.
aw@arthur:~/tests$
platform data (from Apache log) :
[Tue Sep 01 06:25:10 2015] [notice] Apache/2.2.16 (Debian) DAV/2 SVN/1.6.12 mod_jk/1.2.30
mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
There are already many other mod_perl modules of all kinds running on that same server
(but not filters).
What I am missing ?
André