perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randolf Richardson" <>
Subject Re: mod_perl -> application server
Date Thu, 06 Apr 2017 11:39:56 GMT
	Hello Tosh.  I stopped using a very long time ago after 
learning about the apreq2 library which provides access to the 
Apache2::Request module.  Particularly, there is support for CGI 
parameters, including multiple file uploads from the same HTML form, 
and also the Cookie API:

	In addition to mod_perl2, you'll also need to install libapreq2.  On 
NetBSD (the server Operating System that I use), the packages and 
pkgin systems both support this very well with Apache HTTPd v2.2 and 
Apache HTTPd v2.4 on all of my production systems.  As I understand 
it, these modules are also supported very well on other flavours of 
Unix and probably most (if not all) distributions of Linux.

	Apache2::Request is not a drop-in replacement for (or at 
least it wasn't when I initially switched to Apache2::Request), but 
it does provide the functionality needed to handle HTTP's GET and 
POST methods used with HTML forms in a feature-rich manner with a lot 
of flexibility for handling file uploads.

	(I don't know if mod_perl2 provides support for accessing CGI 
parameters without apreq, and I have not looked into it.)

	After I first made the change from to using apreq2, I noticed 
that CPU utilization was dramatically lower during peak times for my 
busier web sites, so I felt that this was well worth the effort.

> Hi, after the recent discussion here about Perl application servers I 
> realized that the architecture I designed is probably better suited to 
> usage with an application server than mod_perl.
> The basic structure of my mod_perl web application is:
> *.pl files are handled by ModPerl::Registry
> All *.pl files are structured in the following way:
> #!/usr/bin/perl
> use strict;
> use CGI;
> ...
> &main;
> sub main {
> ...
> }
> I use 99% ONLY for dealing with input, $cgi->param() ... 99% of 
> output is either JSON or Template Toolkit generated HTML.
> Should I be looking at CGI::Application?
> Or even CGI::Emulate::PSGI ?
> Should I ask this elsewhere?
> Thanks for any advice!
> Tosh
> -- 
> McIntosh Cooey - Twelve Hundred Group LLC -

Randolf Richardson -
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada

View raw message