Hello,

JK>What is the best way to attach a module to be run when a user first
JK>enters the site?

GED>Can you be a bit more specific?

I think the question is better phrased by the subject, "how can I
use mod_perl to handle all requests?"

This is less intuitive than the much more easily understandable "how can I
use mod_perl to handle a request for a certain URL?" In the latter case
you can use Apache::Registry (and associate it with LocationMatch or
FilesMatch or whatever) or an explicit handler. In the former case, it's
not as obvious.

One solution is to use a PerlTransHandler with a dispatch table in it. The
PerlTransHandler will be called on all requests, and you can inspect
$r->uri to see if you want to handle it. Return DECLINED if it's not
something you're interested in handling (say a /images URL); otherwise,
handle the request right away, internally redirect to another handler, or
just directly add the handlers you want down the chain.

Hope that helps--

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       [EMAIL PROTECTED]
Engineer                   [EMAIL PROTECTED]          Voice 650-930-9062
Tellme Networks, Inc.       1-800-555-TELL            Fax 650-930-9101
----------------------------------------------------------------------

Reply via email to