Packaging Perl Modules

Deepan Chakravarthy N

Center for Biotechnology

Anna University

http://users.kaski-net.net/~deepan

deepan AT bioinformatics DOT org

What will I speak about ?

What will I not speak about??

What is a perl module?

  • collection of functions that perform a set of tasks that work towards a common goal (.pm extension)
  • a mechanism to protect packages from stamping each others variables.
  • $x is same as $main::x (main is the default name)
  • package mypkg; then $x is $mypkg::x
  • to use variables from other modules $othermodulename::variablename

Resolving dependency problem

  • installing perl modules using tarballs lead to dependecy problem.
  • use CPAN shell to avoid dependency problems
  • perl Makefile.PL PREFIX=/home/user; make; make test; make install
  • perl -MCPAN -e 'install WWW::Yahoo::Groups'

The CPAN Shell

  • $perl -MCPAN -e shell
  • $get WWW::Yahoo::Groups
  • $make WWW::Yahoo::Groups
  • $install WWW::Yahoo::Groups
  • edit /home/user/.cpan/CPAN/MyConfig.pm

The CPAN Shell

  • perl -MCPAN -e shell
  • get WWW::Yahoo::Groups
  • make WWW::Yahoo::Groups
  • install WWW::Yahoo::Groups
  • edit /home/user/.cpan/CPAN/MyConfig.pm
[any material that should appear in print but not on the slide]