> Many messages on this list perpetuate the notion that usage of CGI.pm and
> Apache::Registry is for beginners.

CGI.pm is a beautiful hack, and the kind of ultimately flexible program that
could only have been written in perl.  Why would you want to avoid CGI.pm?
Because it's slower and uses more memory than Apache::Request, or even
CGI_Lite.  There are lighter alternatives to get the HTML generation as
well, but I don't use that so I can't comment on them.

Apache::Registry is a great way to get legacy stuff running under mod_perl
fast.  Why avoid Apache::Registry for new projects?  Because having your
code wrapped in a subroutine makes life difficult when you want to define
subs of your own.  Because many of the problems discussed in the Guide and
mod_perl_traps document are Registry specific.  Because you don't want that
stat call on every request and RegistryBB might actually be slower.  (It was
for me.)  Because run-time calls to eval (which Registry uses to compile
your script) can leak memory in certain situtations.  Because it's nice to
control your namespace.  Because mod_perl is more than just content
handlers.

But I use it because I like to feel 3l33t.  Give me warez, d00dz!

By the way, if you really have several hundred unique handlers that all need
their own <Location> entries, you have bigger fish to fry than filling out
httpd.conf.  Most people assign entire directory hierarchies or file
extensions to one handler.

- Perrin

Reply via email to