The best way to install Perl modules is using the CPAN shell. You need to go to the unix shell and type the command:

perl -MCPAN -e shell

After this, you can install any module with the command

install module::submodule

Example:

install Spreadsheet::Read.

When setting up the CPAN shell for the first time, we recommend choosing one of the mirror servers listed in the “Europe/Russia” category.

If necessary, you can edit the configuration file - /home/uXXXXX/.cpan/CPAN/MyConfig.pm, where uXXXXX is the number of your virtual site.

Important:

When configuring the CPAN shell for the first time, answer the question:

Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:

     PREFIX=~/perl       non-root users (please see manual for more hints)

Your choice:  []
need to answer:
Your choice:  [] PREFIX=~/perl

It is in this case that all necessary modules will be correctly installed in your home directory.

Esta resposta lhe foi útil? 27 Usuários acharam útil (86 Votos)