On Sat, 2004-02-14 at 09:32, Ged Haywood wrote: > Hi there, > > On Fri, 13 Feb 2004, Garth Webb wrote: > > > So what is a good alternative to Apache::Registry? My impression was > > that this is the thing to use unless you want the extra functionality of > > something like HTML::Mason. > > I'm not sure I understand the question. Apache::Registry offers a > means to simulate a CGI environment, so that many existing CGI scripts > can run unmodified (or with very little modification) under mod_perl, > giving a substantial performance boost in most cases. Toolkits like > HTML::Mason offer very rich sets of features well beyond the scope of > Apache::Registry and shouldn't really be compared with it.
(Ged, Sorry for the off-list response) My question was a little confusing. My comparison between Apache::Registry and HTML::Mason had to do with both assuming the job of PerlHandler. That is, with either one I don't have to make each script I write into a Perl module and then have separate <Location> entries mapping each module to a location in my httpd.conf. With both I can give a path to my script from the document root and they will take care of accepting the request and calling my script. I have around 100 scripts right now, and while I could convert them all to packages and then set up 100 entries for each in the httpd.conf file, it seems like that would create a system that is very difficult to maintain. For instance, right now I can add a new script and it will be available to the world whereas with the handler method I would need to restart Apache so that it can read in the new conf. I could write a package that would handle all the requests and then call the appropriate scripts for me, but then I've reinvented Apache::Registry. So my question is, what do you think is the better alternative to Apache::Registry? If its bad enough that someone like me might have written a replacement, where is it? Do people really have conf files with 100's of <Location> directives? It seems to me that most people these days are using toolkits which take care of this URL location to script location automatically, (thus my original question). > > I read: > > > > http://perl.apache.org/docs/1.0/guide/performance.html#Apache__Registry_PerlHandler_vs__Custom_PerlHandler > > > > which shows Apache::Registry is slightly slower (but not by much) than > > writing a custom Handler. In my case I have 100's of scripts I'd have > > to write custom handlers for which seems like a maintenance nightmare. > > The advice I gave about handlers was to someone starting from scratch > for whom performance clearly isn't the issue. I wouldn't have given > that advice to someone who wants to run hundreds of existing CGI > scripts with minimal maintenance issues. I'd probably say now could > be a good time to look at the 'strict' pragma and the '-w' switch. > > > Has someone reinvented Apache::Registry in a way that isn't a horrible hack? > > Not as far as I'm aware. :) > > Ged. -- |- Garth Webb -| |- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part