----- Original Message ---- > From: Fred Moyer <f...@redhotpenguin.com> > To: Joe Schaefer <joe_schae...@yahoo.com> > Cc: mod_perl list <modperl@perl.apache.org> > Sent: Thu, June 16, 2011 5:01:49 PM > Subject: Re: How do you use mod_perl for your web application? > > On Thu, Jun 16, 2011 at 1:30 PM, Joe Schaefer <joe_schae...@yahoo.com> wrote: > > Sigh. The big win with mod_perl2 is you get to interface with the rest > > of the C modules for httpd, often via subrequests. At the ASF we've > > been running mod_perl2 as our frontline mailserver for over 5y > > This is Apache2::Qpsmtpd right? Nice module. > > > , and recently > > I wrote an ASF-wide CMS with it that's gaining more and more users as > > time goes on, in under 5K LOC. Haven't seen the need for app frameworks > > because most of my code is mod_perl2 specific- it just won't work in any > > other webserver. > > I guess I should rephrase what I said earlier; I don't see use of > mod_perl2 for web applications going away. I see the usage pattern > for Perl based web applications that use frameworks like Catalyst et > al becoming one where there is less usage of tightly coupled modules > such as Apache::Session and Apache::DBI.
To me writing to a generic webserver API is not all that exciting. Python people love it, but they've never had a proper exposure to httpd in the first place. Yes it means you gain some portability, but the downside is that you lose an awful lot of power that comes from the existing open source module ecosystem for httpd. That's not easily replaced, no matter what others may say. > The ability to interface with the httpd C modules is a big win that I > don't think a lot of users appreciate until their application gets big > enough to cause pain. Output compression is one area I've seen people > struggle with in Perl land, and write elaborate hacks into their > Catalyst application, when they could do the same thing in httpd.conf > with 'Include conf/deflate.conf' and just stuff all the mod_deflate > directives in that file. > Yup. Content negotiation is another area where people come up with lotsa sloppy hacks. Just run a subrequest with content-negotiation enabled and be happy- it just works.