How To Install Perl In Redhat Linux
The Comprehensive Perl Archive Network (CPAN in short) is a popular central repository of currently 188,714 Perl modules in 40,986 distributions. It is a single location where you can find, download and install any of the incredible (and all the same growing) drove of Perl libraries.
Information technology has 25,000 modules available and it is mirrored on servers around the world. It also supports automatic testing: cross-platform and on multiple versions of Perl, and bug tracking for every library. Also, you can search information technology using various sites on the web, which offer tools such every bit grep, version-to-version diff besides as documentation.
The CPAN Perl module is a core module that allows you to query, download, build and install Perl modules and extensions from CPAN sites. It has been distributed with Perl since 1997 (5.004). It includes some primitive searching capabilities and supports named and versioned bundles of modules.
In this commodity, you will learn how to install Perl and Perl modules in CentOS 8 using CPAN.
How to Install Perl CPAN Module in CentOS eight
Earlier you lot can use CPAN, yous need to install the Perl-CPAN packet, using the DNF package manager as shown.
# dnf install perl-CPAN

Note: Although about Perl modules are written in Perl, some utilize XS – they are written in C and then require a C compiler which is included in the Development Tools package.
Let's install the Development Tools packet as shown.
# dnf install "@Development Tools"

How to Install Perl Modules Using CPAN
To install Perl modules using CPAN, you need to use the cpan command-line utility. You tin can either run cpan with arguments from the command-line interface, for case, to install a module (due east.g Geo::IP) use the -i
flag equally shown.
# cpan -i Geo::IP OR # cpan Geo::IP
When yous run cpan for the first time, it requires configuration as shown in the screenshot beneath. For this guide, we will enter yes
to configure it automatically. If you enter no
, the configuration script will take you through a series of questions to configure it.

The following screenshot shows the module Geo::IP has been installed on the system.

Alternatively, you can run a cpan without arguments to start CPAN.pm shell. And so use the install sub-command to install a module (e.k Log::Log4perl) equally shown.
# cpan cpan[1]> install Log::Log4perl

How to List Installed Perl Modules and Versions
To list all installed Perl modules with their versions, use the -l
flag equally shown.
# cpan -fifty

How to Search a Perl Module Using CPAN
To search a module, open the cpan beat and apply the m
flag every bit shown.
# cpan cpan[i]> thou Cyberspace::Telnet cpan[1]> m HTML::Template

For more information, read the cpan transmission entry folio or get assistance from the CPAN shell using the help control.
# man cpan OR # cpan cpan[i]> help
How to Install Perl Modules Using CPANM
App::cpanminus(cpanm) is another popular module used to download, unpack, build and install modules from CPAN. To get it working on your system, install the App::cpanminus module as shown.
# cpan App::cpanminus

You can install a module using cpanm as shown.
# cpanm Internet::Telnet

How to Install Perl Modules from Github
cpanm supports the installation of Perl modules directly from Github. For case, to install the Starman – a loftier-operation preforking Perl PSGI web server, run the following command.
# cpanm git://github.com/miyagawa/Starman.git

For more than usage options, see the cpanm man page.
# man cpanm
CPAN is a single location where you can find, download and install Perl modules; it currently has 192,207 Perl modules in 41,002 distributions. If yous have whatsoever queries, share them with the states via the feedback class beneath.
If You Appreciate What We Practise Here On TecMint, You lot Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Manufactures, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider ownership usa a coffee ( or ii ) equally a token of appreciation.
Nosotros are thankful for your never ending support.
Source: https://www.tecmint.com/install-perl-modules-using-cpan-on-centos/
Posted by: ortiziggerstoost.blogspot.com
0 Response to "How To Install Perl In Redhat Linux"
Post a Comment