dictyBase Developers

Solving one problem at a time

Setting Up Perl Environment for Development

Install perlbrew

Perlbrew will be used to install and manage different version of stable perl releases. This OS installed perl will be left untouched.

1
curl -kL http://install.perlbrew.pl | bash

Then follow the instruction in the screen. The above command will set up perlbrew for majority of the cases. For more details of if it fails look here. For system wide or custom installation look here.

Install perl using perlbrew

By default we use perl-5.10.1, however other versions namely perl-5.12.4, perl-5.14.2, perl-5.16.0 will be fine. A simple

1
perlbrew list

will show you the list of perls that can be installed.

1
2
3
perlbrew install -j 4 perl-5.10.1
perlbrew alias create perl-5.10.1 deploy-perl
perlbrew switch deploy-perl

Install friends of perl

These are highly recommended modules primarilly to manage dependencies.

1
2
perlbrew install-cpanm
cpanm -n App::cpanoutdated App::pmuninstall Carton

Note: The (-n) option is used for faster module installation as it skips the unit testing. Look here for a list highly recommended modules by community used for perl development.

Managing modules

Creating sandbox

Always create a project specific local lib environment(sandbox) for managing module dependencies.

1
2
perlbrew lib create project_name
perlbrew use perl_name@project_name
Installation
1
2
perlbrew use perl_name@project_name
cpanm -n some_module_name
Update
1
cpan-outdated -p | cpanm -n
Uninstall
1
pm-uninstall some_module_name