Perl Modules are in fact libraries of functions that will help you in your source code.
By default, the module include path is:
/home/username/perl
To let Perl know how to find the modules, use at the beginning of your script:
#!/usr/bin/perl
use cPanelUserConfig;or
#!/usr/bin/perlml
The Perl system modules installed by cPanel are listed below. You can manually install the Perl modules that you want.
System Perl Modules |
CPAN |
CPAN::Meta::Requirements |
CPAN::Meta::YAML |
Crypt::PasswdMD5 |
DBD::mysql |
DBI |
Digest::MD5 |
Digest::SHA1 |
Expect |
ExtUtils::MakeMaker |
GnuPG |
IO::Tty |
LWP |
LWP::Protocol::https |
Mozilla::CA |
Net::HTTP |
Regexp::Assemble |
Test::Pod |
Test::Simple |
Try::Tiny |
URI |
local::lib |
version |
To install a Perl Module in cPanel:
- Log into the cPanel account
- Locate Perl Modules in the SOFTWARE section
- If you know the exact module name that you want to install, just type its name in the Install a Perl Module edit box and click the Install Now button.
- If you don’t know the exact module name click the Show Available Modules, look for the desired module, and click the Install link.
- Click the Go Back button
- You will see the installed modules in the Installed Perl Module(s) section.
From the Installed Perl Module(s) section, you can Update, Reinstall, Uninstall and view the docs for each module.
Contact your host if you are getting error messages while installing Perl modules.
Some modules have dependencies, so other modules may be installed with your desired module.
Video tutorial for installing a Perl Module – in this case the String::Diff module:
If you have SSH access you can use perl -v and instmodsh commands for more information.
Examples:
root@web [~]# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 34 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root@web [~]# instmodsh
Available commands are:
l - List all installed modules
m - Select a module
q - Quit the program
cmd? l
Installed modules are:
CPAN
CPAN::Meta::Requirements
CPAN::Meta::YAML
Crypt::PasswdMD5
DBD::mysql
DBI
Digest::MD5
Digest::SHA1
Expect
ExtUtils::MakeMaker
GnuPG
IO::Tty
LWP
LWP::Protocol::https
Mozilla::CA
Net::HTTP
Perl
Regexp::Assemble
Test::Pod
Test::Simple
Try::Tiny
URI
local::lib
version
cmd? q
root@web [~]#