Configuring And Using Perl CPAN On Slackware

Published: {ts '2012-02-14 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/configuring-and-using-perl-cpan-on-slackware/

Recently I have been messing around with setting up a mailserver (more on that later) and one of the steps in doing this was to install a spam filtering program. The one I chose "spamassassin" requires several perl modules to be installed. To do this I used CPAN.

Here is how I configured CPAN it and used it to install the modules I needed.

Start a CPAN 'shell'

To use CPAN you need to open a shell. To do this run the below command.

The first time you run CPAN, it will want to be configured. I just answer yes to the prompt and let it autoconfigure.

perl -MCPAN -e 'shell'

Upgrade CPAN

CPAN comes installed on slackware, but it is a good idea to update it when you first run it. Answer yes to connect to the internet, and follow the prompts to answer a few necessary questions. I just stick with the default answers.

cpan> install Bundle::CPAN

Get Help

If you get stuck use the "h" command to get help.

cpan> h

Install a Package

This is the meat of CPAN, installing a package. Just use this simple command.

cpan>install package_name

Exit CPAN

Once you are done installing your packages just type exit to quit CPAN.

cpan> exit

I know this is an easy one, but sometimes life is just that easy :-) . For more information on CPAN visit http://www.cpan.org