You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Marc M. Adkins" <mm...@Doorways.org> on 2003/04/17 21:15:21 UTC

generalized web page drivers

Over the years I created a set of Perl classes that allowed me to generate
web pages via CGI, FastCGI, or HTTP::Daemon.  Write the application-specific
code once and re-use via different drivers.  This was often helpful in
moving from development environment to deployment, or in re-hosting existing
code.

Until recently I never got around to using mod_perl.  Mostly because my
target systems and hosting ISPs didn't provide that support.  In fact they
still don't...but I've got time on my hands (bless the current economy) and
I installed Apache 2 and mod_perl 2 on my home system.  Nice.

So I just spent several days extending my old classes to provide mod_perl
support.  Not terribly difficult.  But the result, while not displeasing,
has a few drawbacks.

For one thing, I don't use any particular standard set of method calls.
This thing just evolved.  So another user would find the whole thing
strange.  Not such a problem since there are no other users at this point.

For another, _any_ specific target platform will have some overhead since
I'm wrapping a layer of foo around each of them.  And mod_perl seems to
already provide a lot of the overhead-intensive and generally necessary
functionality that I've evolved, so using my layer of code will definitely
slow things down with mod_perl.  The other previous layers added
functionality that wasn't already there, so it wasn't such an issue.

It occurs to me that, having solved all of these problems, I could convert
my existing code body to a set of classes and applications that would
execute the most common mod_perl handler cases.  That is to say, one could
write a mod_perl handler in a standard manner and run it via
Apache/mod_perl.  Then, if necessary, one could run an HTTP::Daemon
application that would execute the same handlers.  Or a FastCGI application
that would do the same thing.  Or a CGI wrapper that would execute a single
handler per call.

There would of course be some restrictions.  Maybe a _lot_ of restrictions.
But I can easily provide the most-used functionality.  I've already written
most of this code, it just doesn't _look_ like mod_perl.

Is there already such a facility?  If not, is this something that would be
useful to anyone other than myself?  'Cause if no one else cares I should
just use it the way it is.  If it ain't broke...

mma