On Fri, 20 Jun 2003, Ged Haywood wrote: > Date: Fri, 20 Jun 2003 17:25:23 +0100 (BST) > From: Ged Haywood <[EMAIL PROTECTED]> > To: Peter B. Ensch <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: A::Registry vs. mod_perl handler philosophy > > Hi there, > > On Fri, 20 Jun 2003, Peter B. Ensch wrote: > > > I'm beginning to develop apps under mod_perl. I'm > > curious as to how people decide between coding for > > Apache::Registry vs. mod_perl handlers. > > Use Apache::Registry only if you have to in order to get legacy CGI > scripts working. > > > It's been suggested to me that content generating > > apps should be done under A::R, whereas logging, > > authentication Etc. should be implemented as > > mod_perl handlers. > > All new code should use handlers. > > 73, > Ged.
I wouldn't be so strict about such definitions. If you're only looking to generate content, then I don't see a problem with writing "standard" CGI scripts and running them under A::R. If you stick with "strict" and "warnings" and follow the gotchas listed in The Guide[1], you should be fine. If you also choose to code carefully, you can use the same script under mod_perl or not without changing anything (if that's important to you). Or am I missing something? At CSHL, all our Apache servers are compiled with mod_perl, but Lincoln still has us write most everything as CGI scripts. It's easy and works just fine for us. Also saves having to add <Location> directives to httpd.conf everytime you want to add a new script. Whatever works for you, I say. But mayhap I'm too permissive. ky [1]-http://perl.apache.org/guide