# Perl

The Perl motto is There is more than one way to do it and the three principles for any programmer are Laziness, Impatience, & Hubris, according to the Perl manual. On top of that, Perl is well suited for any purpose, and. Why not use Perl? Anyways, in this chapter we'll briefly cover a Perl installation, and then we'll show you which Perl modules are required for a working LiveJournal installation.

## Installing Perl

Perl offers distributions for many operating systems, including Win32 and almost all of the different flavors of Unix. Installations on any of these systems should be fairly easy, as most offer a simple installation program that guides you through setup.

The complete Perl documentation is included with every Perl install, so if you have any Perl specific questions, you might want to refer to the specific documentation first. As quoted from the Perl FAQs: The complete Perl documentation is available with the Perl distribution. If you have Perl installed locally, you probably have the documentation installed as well: type man perl if you're on a system resembling Unix. This will lead you to other important man pages, including how to set your $MANPATH. If you're not on a Unix system, access to the documentation will be different; for example, it might be only in HTML format. But all proper Perl installations have fully-accessible documentation. Consult Obtaining and Learning about Perl (perlfaq2)

### Debian

If you're using Debian, Perl should already be installed. If not, the required package is simply `perl`

## Installing Perl Modules

LiveJournal requires several Perl modules to be installed. Installing these modules requires a fully working perl and C development environment (including a C compiler and make tool).

Some modules such as GD and Compress::Zlib require certain C libraries to be pre-installed on your machine in order to work. Please read the author-provided README files for each module before proceeding further.

&lj.install.perl.module.list;

There used to be a few custom `LJ::` modules that needed installing. Those no longer need to be installed on the system, as LJ uses them right out of `/cgi-bin/*` instead. If by chance you have those old LJ modules installed, it's best to go remove them since Perl will prefer system-level ones over the (newer) local ones.

To ensure that you have installed the necessary modules, be sure to run the included tool: ``$LJHOME`/bin/checkconfig.pl`. If checkconfig.pl doesn't detect all of the required modules, it will tell you which ones you are missing. Note that this tool will fail after checking for modules, because it will also check for a database connection, which hasn't been set up yet. This will be fixed later when we add options to checkconfig.pl to detect for specific sections of installation.