[boulder.pm] Quickie mod-perl question

Rob Nagler nagler at bivio.biz
Wed Sep 18 13:06:30 CDT 2002


> I'm starting work on an extranet for work and wanted to know about
> mod-perl.  I can't use php because I can't get it to work with Oracle so
> I'm thinking that perhaps mod-perl will work, assuming I can get it to
> work with the perl DBI stuff.

We use mod_perl with both Oracle and Postgres.

> So, my question is, does mod-perl work in a fashion that is fairly similar
> to php?

No.  There are modules you can use for templating, however.  The
choice is daunting:

http://perl.apache.org/products/app-server.html

And some kits may not be on this list.

This is very good article on building applications in mod_perl:

http://www.perl.com/pub/a/2001/10/17/etoys.html

> Additional information such as session tracking, etc. would be great too,
> but I'm just trying to decide if I'm going down the right path.

My experience tells me that sessions are more trouble than they are
worth.  We run all our servers sessionless.  You do need to track
authentication information in a cookie, however.  You can see an
example (including code) of a mod_perl application at:

http://petshop.bivio.biz

If you are building something reasonably complex or you plan on
building lots of sites with a small number of functions, I think
you'll be better off using mod_perl.  My experience with PHP is
very limited (helping someone debug), but I find it to be
unnecessarily convoluted, e.g. in Perl, there's one "sort" function
and in PHP there are 6(?) (ksort, uasort, etc.).  The simplicity of
Perl for programmers is what makes Perl a good choice imiho.

Rob





More information about the Boulder-pm mailing list