FreeBSDwiki:Cpan
From Ubuntuwiki.net
Perl has a module called CPAN with which one can install CPAN modules along with all of the modules they depend on. To invoke it, become root and type perl -MCPAN -e shell at the command line, and follow the instructions it gives you. (There will be some configuration needed, the first time you invoke cpan. Don't worry, the system will talk you through it - when in doubt, just press enter.) The install command can be used to automatically install modules. You may also use the install command without needing to actually enter the shell; for example to install the module "Config::IniFiles" the following command works:
server# perl -MCPAN -e 'install Config::IniFiles'
CPAN stands for Comprehensive Perl Archive Network. The collection of modules available via CPAN (along with the modules themselves, should you wish to attempt downloading them and installing them manually) can be found at http://cpan.org.