Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

FilterHasInitHandler not working



ModPerl modperl RSS feed   Index | Next | Previous | View Threaded

jzobel at heute-morgen

May 28, 2012, 9:21 PM

Post #1 of 1 (415 views)
FilterHasInitHandler not working


I have a rather straight test (see below) that tells me my
FilterInitHandler is not called.

Am I missing something obvious or is this a bug?


PerlModule TestInit

# The html file is arbitrary
<Files test6.html>
SetHandler modperl
PerlOutputFilterHandler TestInit
use strict;
use warnings;

use Apache2::RequestRec;

use Apache2::Filter;

use APR::Brigade ( );
use APR::Bucket ( );
use APR::BucketType ( );

use Apache2::Log;
use APR::Const -compile => ':common';
#use Apache2::Const;

package TestInit;

use URI;

use base qw(Apache2::Filter);

# Test if filter init is working
sub init: FilterInitHandler {
my($filter) = @_;

$filter->r->log->debug("Init handler will be initialised.");

sub handler: FilterHasInitHandler(\&init) {
my($filter, $bb) = @_;

$filter->r->log->debug("Init test handler called.");
if ($filter->ctx) {
return $filter->next->pass_brigade($bb);
$filter->r->log->error("Init test handler failed.");

# Just says no success (which gives a 500)
return 500;


ModPerl modperl RSS feed   Index | Next | Previous | View Threaded

Interested in having your list archived? Contact Gossamer Threads
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.