I came across an unexpected feature of PerlInitHandler today.

In the distant past, for whatever reason, I configured mod_perl to have
PerlInitHandler, but not PerlPostReadRequestHandler.

Today I tried to hook a handler to PerlPostReadRequestHandler, and got
an error on start up, saying that I hadn't compiled it in.

Rather than recompile Apache, I dug out the Eagle book to find another
suitable handler. I discovered PerlInitHandler.

The Eagle says that PerlInitHandler is an alias for
PerlPostReadRequestHandler when used at the 'top-level' of a
configuration file.

Great, I thought. I'll try it.

Apache started quite happily.

But my handler wasn't being called.

Hmm, I thought. So I had a closer read of the PerlInitHandler section,
and noted it said *alias*.

To cut the story short, I recompiled apache, adding the
'PERL_POST_READ_REQUEST=1' necessary. It worked perfectly first time.


My question is this: should PerlInitHandler have given me an error
message?


Steve

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz

Reply via email to