Perl
From charlesreid1
Modules
More info here: http://www.cpan.org/modules/index.html
Finding
Use the Comprehensive Perl Archive Network (CPAN) to find useful Perl modules. Most Perl modules are on CPAN.
Installing
Before you install perl modules: cpanm
The cpanm utility can be used to easily install perl modules. To install this utility, run the command:
$ cpan App::cpanminus
This will ask several questions and has several prerequisites, including the following:
- gzip
- tar
- unzip
- make
- lynx (available via Fink for Mac)
- wget (available via Fink for Mac)
- ncftpget (available for most operating systems here: http://www.ncftp.com/download/)
- ftp
- gpg
- less/more (pager program)
Note that if you are running Mac OS X, you will also need to install developer tools (via XCode on the installation CD, or by downloading and installing XCode 3 from Apple).
Once you've run the above command, cpanm will be a script located in:
~/.cpan/build/App-cpanminus-1.4004/blib/script/cpanm
Installing perl modules with cpanm
You can install a module found on CPAN by running the command
$ cpanm Module::Name
If you run this as a regular user, it will put everything in
~/perl5
If you run this as the superuser, it will put everything in
/usr/local/bin
and/or, if you're on a Mac, in
/Library/Perl/5.8.8
Alternatively, use the runtime option --local-lib=/path/to/perl/install/location, or set the environmental variable PERL_CPANM_OPT="--local-lib=/path/to/perl/install/location".
Updating
You can update your cpanm by running
$ cpanm App::cpanminus
or
$ cpanm --self-upgrade
Perl Module Example
Graphviz example goes here
References
- Comprehensive Perl Archive Network (CPAN): http://www.cpan.org/