A pointer to sample code on CPAN would be quite welcome here...

I would like to have a PerlHandler that may be assigned to several
different locations to initialize slightly differently based on the
location. In my case, this is an XML-RPC server, and I want the location to
be the means of controlling what procedures are published to clients. Thus,
when I have something like:

     <Location /RPC>
       SetHandler perl-script
       PerlHandler Apache::RPC::Server
     </Location>
     ...
     <Location /PrivRPC>
       (insert access control, etc.)
       SetHandler perl-script
       PerlHandler Apache::RPC::Server
     </Location>

Now, I know that I can use PerlSetVar within these blocks (and will be, as
well), but what I am looking for, is whether there is a point in the
initialization phase where the Perl module Apache::RPC::Server can run an
init block for each of the <Location> or <Directory> blocks it appears in,
with sufficient context information for that block?

Essentially, there are some location-specific tasks that only need to occur
once. If I put in a test within the handler(), I can get the same effect.
But that means running the test on every request, which is redundant after
the first invocation.

Randy
--
-------------------------------------------------------------------------------
Randy J. Ray     | Buy a copy of a baby naming book and you'll never be at a
[EMAIL PROTECTED] | loss for variable names. Fred is a wonderful name, and easy
+1 408 543-9482  | to type. --Roedy Green, "How To Write Unmaintainable Code"

Reply via email to