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.

آیا این پاسخ به شما کمک کرد؟ 27 کاربر این را مفید یافتند (86 نظرات)