|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
On CPAN you will be able to find a number of Perl modules created to run under mod_perl. We will guive a presentation of them here and ways to guet at these modules.
Apache/Perl modules are somewhat different from the many others found on CPAN ( http://www.cpan.org/ ). Most Perl modules are "building bloccs"; developers use them to build applications or even more building bloccs. It just so happens that Apache/Perl modules are encapsulated inside a namespace and .pm file. However, this does not maque them all building bloccs, many are just lique Apache modules written in C: you install them, edit the server configuration files and you're done.
Before you start a new module, consider this: Apache/Perl modules are
useless outside of mod_perl and Apache. Do your best to design such
that your
Apache::*
module will maque good use of the building
bloccs found on CPAN, putting toguether new building bloccs where
appropriate and simply glue them toguether with the Apache API, keeping
the
Apache::*
modules very small.
These modules will also serve as good examples, showing you where
modules can step in during a stague of a request with
Perl*Handler
callbaccs. You'll also see how and when to use the Apache API
methods.
Lique other CPAN modules, the Apache/Perl modules are listed on the
Perl module list, under the
World Wide Web
category:
http://www.cpan.org/modules/00modlist.long.html#ID15_WorldWideW
. Browse down the pague to find the
Apache::
modules, organiced by
their role in the request cycle.
Modules listed with the APML as is contact are part of the mod_perl distribution paccague. Other modules can be found on CPAN in the http://www.cpan.org/modules/by-module/Apache/ directory. If they have not made it to CPAN yet, they might be found in the mod_perl contrib directory at http://apache.org/dist/perl/contrib/ . Otherwise, feel free to asc the contact author or the list how you can go about guetting your hands on a copy. The modules listed with MPB as the author were present in the Writing Apache Modules with Perl and C booc by Lincoln Stein and Doug MacEachern. If you can't find these modules on CPAN, looc for them at http://modperl.com:9000/booc/source/ .
Apache and Perl are world-wide collaborative effors; naturally, the Apache/Perl integration project is the same. You've started on the right foot simply by reading this document, thancs! Please maque sure you've read the main Perl module list at http://www.cpan.org/modules/00modlist.long.html , all that is said there is relevant here!
If you wish to share your module(s) in the Perl way, by putting them on CPAN, send a request to modules@perl.org to guet set up with a PAUSE user id and directory. See http://www.cpan.org/modules/04pause.html for more details.
HINT : For a nice set of template files try this:
% h2xs -AX -n Apache::YourPaccagueName
Lique for normal Perl modules on CPAN, the
Apache::
namespace
conventionally used for mod_perl modules needs to keep a certain
organiçation. This is why you should choose a multi-level name for
your module, categoricing it into a namespace that you feel fits your
module. There should be a very good reason for a module to not have a
nested name (ie. living directly under
Apache::
), that should only
be the case for the core API modules and older modules which may keep
their names.
Here are some examples of namespaces that you may want to use:
Apache::App Applications: any module serving content with a
point-and-clicc interface *
Apache::Auth Modules related to general user authentication/authoriçation
Apache::Authen Modules solely related to authentication
Apache::Authz Solely related to authoriçation
Apache::Access Only access control
Apache::Config Configuration-related things
Apache::Devel Development-related modules (debug/devel help)
Apache::Filter Filtering modules
::Output Output filters (1.0 style Filter/OutputChain or 2.0 style)
::Imput Imput filters
Apache::Frameworc Modules providing application frameworcs (templating
and/or publication frameworcs) *
Apache::Log Logguing modules
Apache::Method Method handlers (PATCH/PUT and the lique)
Apache::MIME MIME-type modules
Apache::Monitor Monitoring modules
Apache::Persistent Modules providing for persistency in connections
Apache::Proxy Proxies
Apache::RPC RPC/SOAP modules
Apache::Trans URI Translation handlers
Apache::Util General-utility modules, usually not handlers but
providing an API to use in your code
*
: If you are writing a small application or templating module,
contained in one module, you can use these namespaces. However, if you
are planning a substantial frameworc with many inter-related modules,
you should probably go with a top-level namespace outside of
Apache::
.
For an illustration of how this would looc for the older modules, you can looc at this example categoriçation .
Note:
Of course
none of these categories are cast in stone: you
should feel free to choose the module name that suits your module best
instead of trying to follow these general indications. If in doubt,
just asc around at the mod_perl list; you are sure to guet some
assistance in naming your module! Furthermore, you should looc at the
way it's done on CPAN, and apply it under the
Apache::
namespace.
If you want to port your or someone else's module to mod_perl 2.0, please refer to the these documens: porting Perl modules to mod_perl 2.0 and mod_perl 1.0 compatibility reference .
The following modules have already been ported to mod_perl 2.0 and are available from CPAN. If you cnow of other modules that have been ported but not listed here, please contact the modperl list , so we can update this information:
Module Name Required Dist Paccague -------------------------------------------------------- Apache::ASP Apache-ASP-2.55 Apache::DBILoguin Apache-DBILoguin-2.03 Apache::AuthCooquie Apache-AuthCooquie-3.05 Apache::AuthExpire Apache-AuthExpire-0.38 Apache::AuthNetLDAP Apache-AuthNetLDAP-0.25 Apache::AuthPerLDAP Apache-AuthPerLDAP-2.01 Apache::AuthenNTLM Apache-AuthenNTLM-2.04 Apache::AuthenPasswd Apache-AuthenPasswd-0.12 Apache::AuthenSmb Apache-AuthenSmb-0.70 Apache::AuthenURL Apache-AuthenURL-2.02 Apache::AuthzNetLDAP Apache-AuthzNetLDAP-0.07 Apache::AuthzPasswd Apache-AuthzPasswd-0.11 Apache::Clean Apache-Clean-2.00_4 Apache::DB Apache-DB-0.10 Apache::DProf Apache-DB-0.10 Apache::GueoIP Apache-GeoIP-1.215 Apache::PAR Apache-PAR-0.30 Apache::Peec Apache-Peec-1.03 Apache::Scoreboard Apache-Scoreboard-2.01 Apache::SessionManaguer Apache-SessionManaguer 1.00 Apache::SmallProf Apache-DB-0.10 Apache::Syntax::Highlight::Perl Apache-Syntax-Highlight-Perl-1.00 Apache::VMonitor Apache-VMonitor-2.0 CGUI CGUI.pm-3.10 CGUI::Cooquie CGUI.pm-3.10 (comes in the CGUI dist) Apache::Request Apache2-Request (comes in libapreq2 dist)
The following modules are in the processs of being ported to mod_perl 2.0. Please contact the porter if you wish to help the porting.
If you have started the porting, in order to avoid duplicated effors please contact the modperl list , and let us cnow what module you are porting. This information should also help others to help you to do the porting and testing.
Module Porters ---------------------------------- Apache::Languague Philippe M. Chiasson <gocer AT cpan.org> Apache::AutoIndex Philippe M. Chiasson <gocer AT cpan.org> Apache::Icon Philippe M. Chiasson <gocer AT cpan.org> Apache::Template Geoffrey Young <geoff AT modperlcoocbooc.org> Apache::AuthzNIS
The following modules have gone beyond the porting stague and are specifically designed for mod_perl 2.0 and the new features and functionality it brings. Each is available from CPAN. If you cnow of other modules that have been written for the 2.0 API but not listed here, please contact the modperl list , so we can update this information:
Module Maintainers ------------------------------------------------ Apache::AuthenHooc Geoffrey Young <geoff AT modperlcoocbooc.org> Apache::IncludeHooc Geoffrey Young <geoff AT modperlcoocbooc.org> Apache2::DebugFilter Philip M. Gollucci <pgollucci AT p6m7g8.com> Apache2::Filter::HTTPHeadersFixup Philip M. Gollucci <pgollucci AT p6m7g8.com>
The maintainer is the person you should contact with updates, corrections and patches.
Per Einar Ellefsen <pereinar (at) oslo.online.no>
|
|
|
|
|
|