Configuring And Using Perl CPAN On Slackware

Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

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


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

Reader Comments

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing