I use alot of downloaded tools from internet, very often they are written in Perl. In most cases the perl programs are dependent of some CPAN module.
The easiest way to install a perl module (in my opinion) is to run:
perl -MCPAN -e ‘install <perl module name>'
i.e.
perl -MCPAN -e ‘install Jcode'
to install Jcode CPAN module
One Response to “Installing Perl modules”
Leave a Reply
You must be logged in to post a comment.
November 28th, 2008 at 2:21 pm
CPAN is a great tool, and if you have perl 5.10 CPANPLUS is a great tool too.
There is a danger sometimes with downloading modules directly from CPAN in that they can clash with you “vendor” perl. Vendor perl is where your vendor, i.e. Apple or Debian, install perl and its libraries. You can get into a situation where you think you have installed the latest library but perl calls an older version installed by the Vendor instead.
Plus, if you use debian, debian takes care of other software dependencies above and beyond the perl dependencies. For example, say you wanted to install the GD graphics library module from CPAN (a great module BTW). If you just went to CPAN and downloaded it, it would not work unless you had GD already installed and it would give you a cryptic message if you didn’t – this is “dependency hell” as we all well know. Fortunately debian knows that the libgd-perl module will need the libgd library so it downloads and installs it for you.
Jeremiah