Полезная информация

Mod Perl Icon Mod Perl Icon Guide's Overview

Table of Contents:

[ TOC ]
The Writing Apache Modules with Perl and C book can be purchased online from O'Reilly and Amazon.com.
Your corrections of the technical and grammatical errors are very welcome. You are encouraged to help me improve this guide. If you have something to contribute please send it directly to me.
[ TOC ]

What's inside?

Before you start a mod_perl installation, you should have an overall picture of this wonderful technology. There is more than one way to use a mod_perl-enabled webserver. You have to decide which mod_perl scheme you want to use. Picking the Right Strategy chapter presents various approaches and discusses their pros and cons.

Once you know what best fits your requirements, you should proceed to Real World Scenarios Implementation. This chapter provides very detailed scenarios of the schemes discussed in the Picking the Right Strategy chapter.

The Server Installation chapter follows on from the Real World Scenarios Implementation chapter by providing more in-depth installation details.

The Server Configuration chapter adds to the basic configurations presented in the Real World Scenarios Implementation chapter with extended configurations and various configuration examples.

The Frequent mod_perl problems chapter is a collection of links to other chapters. It is an attempt to stress some of the most frequently encountered mod_perl problems. So this is the first place you should check if you have got a problem.

Probably the most important chapter is CGI to mod_perl Porting. mod_perl Coding guidelines. It explains the differences between scripts running under mod_cgi and mod_perl, and what should be done in order to make existing scripts run under mod_perl. Along with the porting notes it provides guidelines for proper mod_perl programming.

Performance. Benchmarks is the biggest and a very important chapter. It explains the details of tuning mod_perl and the scripts running under it, so you can squeeze every ounce of the power from your server. A large part of the chapter is benchmarks, the numbers that IT managers love to read. But these are different benchmarks: they are not comparing mod_perl with similar technologies, rather with different configurations of mod_perl servers, to guide you through the tuning process. I have to admit, performance tuning is a very hard task, and demands a lot of understanding and experience. But once you acquire this knowledge you can make magic with your server.

While developing your mod_perl applications, you will begin to understand that an error_log file is your best friend. It tells you all the intimate details of what is happening to your scripts. But the problem is that it speaks a secret language. To learn the alphabet and the grammar of this language, refer to the chapter Warnings and Errors: Where and Why.

Protecting Your Site - All about security.

If you are into driving relational databases with your cgi scripts, the mod_perl and Relational Databases chapter will tell you all about the database-related goodies mod_perl has prepared for you.

If you are using good old dbm files for your databases, the mod_perl and dbm files chapter explains how to utilize them better under mod_perl.

More and more Internet Service Providers (ISPs) are evaluating the possibility of providing mod_perl services to their users. Is this possible? Is it secure? Will it work? What resources does it take? The mod_perl for ISPs. mod_perl and Virtual Hosts chapter answers all these questions. If you want to run a mod_perl- enabled server, but do not have root access, read this chapter as well, either to learn how to do it yourself, or maybe to persuade your ISP to provide this service.

If you have to administer your Apache mod_perl server the Controlling and Monitoring the Server chapter is for you. Among the topics are: server restarting and monitoring techniques, preventing the server from eating up all your disk space in a matter of minutes, and more.

(META: fix this) The mod_perl Status. Peeking into the Server's Perl Innards chapter shows you the ways you can peek at what is going on in a mod_perl-enabled server while it is running. Like looking at the value of some global variable, what database connections are open, looking up what modules are loaded and their paths, what is the value of @INC, and much more.

Every programmer needs to know how to debug her program. It is an _easy_ task with plain Perl. Just invoke the program with the -d flag and debug it. Is it possible to do the same under mod_perl? After all you cannot debug every CGI script by executing it from the command line: some scripts will not run from the command line. The Debugging mod_perl chapter proves debugging under mod_perl is possible.

Sometimes browsers that interact with our servers have bugs, which cause big headaches for CGI developers. Coping with these bugs is discussed in the Workarounds for some known bugs in browsers chapter.

Many modules were written to extend mod_perl's core functionality. Some important modules are covered in the Apache::* modules chapter.

Some folks decide to go with mod_perl even though they are not experienced Perl programmers. mod_perl is a demanding environment which does not permit the `casual' programming style which plain Perl allows. Lack of knowledge/experience with Perl need not be any barrier; Perl comes with copious and high quality on-line documentation and there are many Perl books available which will get you up to speed. Get a good Perl book and start reading. The Perl Reference chapter gives some basic, mod_perl specific Perl lessons, delivering the knowledge without which you cannot start to program mod_perl scripts.

The Code Snippets chapter is just a collection of code snippets I have found useful while writing the scripts.

The Choosing an Operating System and Hardware chapter gives you an idea on how to choose the software and hardware for the webserver.

The mod_perl Advocacy tries to make it easier to advocate mod_perl around the world.

The Getting Help and Further Learning chapter refers you to other related information resources, like learning Perl programming and SQL, understanding security, building databases, and more.

Appendix A: Downloading software and documentation includes pointers to the software that was explained and/or mentioned in this guide. [ TOC ]

Your corrections of the technical and grammatical errors are very welcome. You are encouraged to help me improve this guide. If you have something to contribute please send it directly to me.
The Writing Apache Modules with Perl and C book can be purchased online from O'Reilly and Amazon.com.

[ TOC ]
Written by Stas Bekman.
Last Modified at 05/05/2001

mod_perl icon
Use of the Camel for Perl is
a trademark of O'Reilly & Associates,
and is used by permission.