How to install Perl modules
دوشنبه, ۲۰ مهر ۱۳۹۴، ۰۱:۰۰ ب.ظ
Install Perl Modules Manually
Download Perl module
Go to CPAN Search website and search for the module that you wish to download. In this example, let us search, download and install XML::Parser Perl module. I have downloaded the XML-Parser-2.36.tar.gz to /home/download
# cd /home/download # gzip -d XML-Parser-2.36.tar.gz # tar xvf XML-Parser-2.36.tar # cd XML-Parser-2.36
Build the perl module
# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser # make # make test
Install the perl module
# make install
Task: List installed perl module
To display the list enter the following command:$ instmodsh
Sample outputs:
Available commands are: l - List all installed modules m - Select a module q - Quit the program cmd?
At cmd? prompt type l to list all installed modules:cmd? l
Sample outputs:
Installed modules are: Archive::Tar CPAN Class::Spiffy Compress::Zlib Cwd Digest::SHA IO::Zlib MIME::Lite Module::Build Module::Signature Net::Telnet PAR::Dist Perl Spiffy Term::ReadLine Test::Base Test::Simple Text::Glob Weather::Com XML::Simple YAML cmd?