Installing Perl modules

From EPrints Documentation
Jump to: navigation, search
Manual Sections

EPrints is currently begin developed with perl 5.6.1, there are currently no plans for to make EPrints run under perl 6 on the theory of if-it-ain't-broke-don't-fix-it.

Some perl modules are bundled with the EPrints2 package, others must be installed by you.

Installing a Perl Module

This describes the way to simple perl module, some require a bit more effort. We will use the non-existant FOO module as an example.

Some archives can be installed direct from CPAN. That's great when it works. It doesn't always work, but it's the quickest and easiest, so give it a go first. To install a perl module from CPAN run:

% perl -MCPAN -e 'install Foo::Bar'

Where Foo::Bar is the module you're installing.

I would like to make a list of which modules do/don't install OK from CPAN. If you're reading this before the end of Jan 2003, send me (Christopher Gutteridge) any comments on which ones worked, and on what operating system.

Download the archive. 
Either from, or from the tools directory on described at the top of this chapter. Our example archive is FOO-5.23.tar.gz.
Unpack the archive

% gunzip FOO-5.23.tar.gz
% tar xf FOO-5.23.tar

Enter the directory this creates

% cd FOO-5.23

Run the following commands

% perl Makefile.PL
% make
% make test
% make install

Perl Modules Bundled with EPrints

You don't have to install these. They are included as part of the EPrints distribution.

XML::DOM, XML::RegExp, Filesys::DiskSpace, URI, Apache::AuthDBI, Unicode::Normalize, Proc::Reliable.

Please note that these modules are not part of the EPrints system and are only included to make things easier. Please note that XML::DOM has has a few lines commented out to prevent it requiring additional modules.

Required Perl Modules (Which you will probably have to install)

This modules are not built into EPrints - you must install them yourself. We recommend installing them in the order they are listed.

MySQL Interface Module requires this.
Tested with: v1.14

MySQL Interface Module requires this.

Msql-Mysql Module 
Tested with: v1.2215

This one can be tricky. It requires access to .h and library files from MySQL. I install MySQL from source first, but some installs of MySQL don't put the lib and include dirs where this module expects. The answer to the first question is that you only need MySQL support. Under Red Hat's GNU/Linux distribution, the zlib-devel RPM should be installed before you install this module.

Tested with: v2.11

Unicode::String requires this.

Used for Unicode support. No known problems. Tested with v2.06.
Tested with v2.30

Used to parse XML files. Requres the expat library. A .tar.gz and an RPM are available in the tools dir on

The perl module is acutally part of mod_perl - installing mod_perl as part of Apache should also have installed the perl Apache module.

Since version 2.3.7 The modules "Apache::Request" and "Apache::Test" (aka. "libapreq") are no longer required. They were a pain to install and the software has been redesigned to not use them at all.

Required Perl Modules (Which you will probably already have)

Most PERL 5.6 or later systems should already include the following modules, but you may have to install some by hand on certain platforms.

CGI, Carp, Cwd, Data::Dumper, Digest::MD5, File::Basename, File::Copy, File::Find, File::Path, Getopt::Long, Pod::Usage, Sys::Hostname.