On Fri, 31 Mar 2000, Vivek Khera wrote:
> My question to all of you who use handlers directly, how do you manage
> all your handler mappings?  I've seen it done where you add a
> <Location> mapping for each handler you use, which corresponds to each
> "program" you need.  This, in my experience, tends to be error prone
> and results in much cruft in your httpd.conf file.

Works great for me.  I don't tend to have hundreds of these, because I
usually wrap groups of related functionality into one program and then use
additional URI info to determine the exact action of each request - pretty
typical multi-page CGI stuff.

I like the freedom of mapping URIs that make sense to end users to modules
in my class hierarchy that make sense to programmers.  If you like the
convenience of mapping directly to files from the URI, maybe a quick hack
to treat the files as modules is in order.  It could leave out the part
that wraps your code in a sub and slaps a package on it, and just do a
simple require instead (and maybe stat the file first and remove it from
%INC if it has changed, although you could just use Randal's module for
that).  That would fix the things I don't like about Registry.

As for making changes without restarting, I always restart my production
servers when I change code, in order to maximize shared memory, but I can
do this because I have a cluster of servers.  I could see this being a
problem if I only had one machine.

- Perrin

Reply via email to