Show Contents Previous Page Next Page Chapter 2 - A First Module In this section...
Before you can start hacking away at your own Apache modules, there are a number of preliminaries to take care of. This section discusses what you need and how you can get it if you don't have it already. Show Contents Go to Top Previous Page Next PageYou'll need a working version of Apache, preferably a recent release (the version we used to prepare this book was Version 1.3.4). If you do not already have Apache, you can download it, free of charge, from http://www.apache.org/. Users of Windows 95 and NT systems (henceforth called "Win32") who want to
write modules using the Perl API can download precompiled binaries. You will
need two components: the server itself, available at http://www.apache.org/dist/,
and ApacheModulePerl.dll, which is This book will not try to teach you how to install and maintain an Apache-based web site. For the full details, see the Apache server's excellent online documentation or the reference books listed in the preface. Show Contents Go to Top Previous Page Next Page To use the C API, you'll need a working C compiler and its associated utilities.
Most Unix systems come with the necessary software development tools preinstalled,
but sometimes the bundled tools are obsolete or nonstandard (SunOS and HP-UX
systems are particularly infamous in this regard). To save yourself some headaches,
you may want to install the GNU Win32 users are not so lucky. To develop C API modules, you will need the Microsoft Visual C++ 5.0 development package. No other development environment is guaranteed to work, although you are certainly welcome to try; Borland C++ is reported to work in some people's hands. If you are primarily interested in the Perl API, you can use the precompiled binaries mentioned in the previous section. Show Contents Go to Top Previous Page Next PageTo use the Perl API, you will need a full installation of Perl, Version 5.004 or higher. In many cases, this means that you will have to download and install Perl yourself. We have found that some systems that come with Perl preinstalled are missing some of the essential parts of the library hierarchy needed to create and install new Perl modules. This includes certain Linux distributions. Find the Perl source distribution at any of the CPAN sites, download it, and install it according to the directions. This book was prepared using Perl Version 5.004_04.
During installation Perl creates a library file containing all its core routines. On some Unix systems, Perl will offer you the choice between building a statically linked library (usually named Recent Versions of CGI.pm and LWP Show Contents Go to Top Previous Page Next Page
While not strictly necessary, your life will be easier if you have recent versions of the Perl CGI.pm and LWP modules installed. CGI.pm is a collection of utilities that makes conventional CGI scripts easier to write. It also comes in handy for modules written with the
LWP (Library for WWW access in Perl) is a collection of modules for creating web robots, agents, and browsers in Perl. LWP is invaluable for creating web proxies, and we make use of it in later chapters. More important, Both CGI.pm and LWP can be found on CPAN, in the subdirectories Footnotes 1 See the preface for instructions on finding and using a CPAN site close to you. Show Contents Go to Top Previous Page Next PageCopyright © 1999 by O'Reilly & Associates, Inc. |
HIVE: All information for read only. Please respect copyright! |