|FROM ||From: =?UTF-8?Q?Andr=c3=a9_Warnier_=28tomcat/perl=29?=
|SUBJECT ||Re: [Hangout - NYLXS] Confused about two development utils
|On 22.12.2020 06:49, Matthias Peng wrote:
> I am developing a simple mp2 application.
> I looked for the installation for mp2 utils, and found this two:
> what're their relations? Should I install both, or only the first one?
They are different and independent packages and module libraries, and you can use the one
or the other, or both, depending on your needs.
(We always install both, and we use both)
For mod_perl per se, you need only the /libapache2-mod-perl2/ package.
This gives you access to all the stuff documented here :
*except* what is at the very end of that page :
"Part VI: Related Modules" -> libapreq modules
(this is what is contained in the separate /libapache2-mod-apreq2/ package)
The documentation for libapreq is at :
It may be a bit confusing at first, because both (independent) packages use some common
namespaces ("Apache2::" and "APR::"), and because each of mod_perl and libapreq2 have
their own form of "Apache Request object", named very similarly :
- for mod_perl it is Apache2::RequestRec
- for libapreq it is Apache2::Request
(I guess that libapreq was first, that's why they got the better name ;-)
I am a bit reluctant to try explaining the difference further (for fear of confusing you
further), but here is a very rough summary :
- to deal with 99% of what has to do with controlling what happens within Apache httpd in
terms of processing HTTP requests (or just to run your perl scripts faster), use the
So install /libapache2-mod-perl2/ first, and start coding.
- if you finds out later that you have to do a lot of processing of CGI parameters (the
request "query string") or cookies, you can then install and use use the libapreq API
which (among other things) provide an alternative to what the CGI module provides.
In any case, there is a bit of a learning curve, but it is great fun and very powerful.
Hangout mailing list