You want to install a module file that you downloaded from CPAN over the Net or obtained from a CD.
Type the following commands into your shell. It will build and install version 4.54 of the Some::Module package.
% gunzip Some-Module-4.54.tar.gz % tar xf Some-Module-4.54 % cd Some-Module-4.54 % perl Makefile.PL % make % make test % make install
Like most programs on the Net, Perl modules are available in source kits stored as
archives in GNU zip format.[
You'll probably have to become a privileged user with adequate permissions to install the module in the system directories. Standard modules are installed in a directory like /usr/lib/perl5 while third-party modules are installed in /usr/lib/perl5/site_ perl .
Here's a sample run, showing the installation of the MD5 module:
% gunzip MD5-1.7.tar.gz % tar xf MD5-1.7.tar % cd MD5-1.7 % perl Makefile.PL
If your system manager isn't around or can't be prevailed upon to run the installation, don't worry. When you use Perl to generate the Makefile from template Makefile.PL , you can specify alternate installation directories.
Copyright © 2002 O'Reilly & Associates. All rights reserved.