On Sun, Feb 08, 2004 at 10:34:04AM -0500, Jesse Erlbaum wrote: > > I was referring to a cadre of [mod_perl] zealots who insist on writing > web-apps in Apache handler-space. Those guys are nuts. > > IMHO, handler space is perfect for writing Apache API handlers -- IOW, > things which actually require direct access to the API. > (Authentication, Authorization, special content handlers, special > logging handlers, etc.)
It sounds like you are just used to doing it your way. I do not see the distinction. A cgi script starts with a she-bang line and has an entry point, a mod_perl handler starts with a "package" line and needs some subroutine entry point. They are both content handlers. The fact that you can also access other parts of the API other than content seems inconsequential. Using mod_cgi does provide automatic mapping of web space to files with code to run, but you can do that automatically in mod_perl, too. > Web-apps don't need run in handler space to gain the benefits of > mod_perl (see Apache::Registry), and developing them there is a major > pain in the ass. Besides the logistical difficulties (such as having to > restart the server constantly), there haven't been a lot of high-level > tools. That is, until Apache::Request. I never use Apache::Registry. I had some old code that ran for a year with random segfaults. I added a tiny handler() entry point to the cgi script and the segfaults went away. It's very likely that newer versions of mod_perl may have resolved that, but the point was it was trivial to convert my code to a handler. I would never write something new specifically for use with Apache::Registry. As I mentioned earlier, I often write CGI scripts with two entry points so they will run either as a stand-alone CGI or a mod_perl handler. And, I'm sure you realize you don't have to restart the server when making changes under development, not that a SIGHUP is that much trouble. > Apache::Request is attempting to be to mod_perl what CGI.pm has been to > web-apps. Apache::Request is fast, but it is (thus far) incomplete. In what way? You don't mean the widgets, do you? I just think of it as a fast, xs-based param() method without the CGI.pm bulk. -- Bill Moseley [EMAIL PROTECTED] --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
