Perl Module Installation in cPanel & WHM

Perl modules extend the functionality of cPanel & WHM and can be installed into either the system Perl environment or the cPanel-included Perl environment. Using WHM tools, command-line scripts, and CPAN utilities, administrators can install, verify, manage, and troubleshoot Perl modules. Understanding @INC paths, error logs, and installation methods ensures reliable module deployment.

Perl Modulescpanel Perlperlinstaller

~3 min read · Updated Feb 18, 2026

1. What Are Perl Modules?


Perl Modules allow you to extend the functionality of cPanel & WHM. These modules can introduce new features or enhance existing ones. Before installing any module, ensure that it is compatible with the Perl environment provided by cPanel.


2. Install Modules to the System Perl


The system Perl environment is located at /usr/bin/perl. You can install modules into this environment using several methods.


2.1 Install from WHM


To install a Perl module through WHM, navigate to:


WHM » Software » Install a Perl Module


You must have compiler access enabled to use this interface.


2.2 Install via perlinstaller Script


The perlinstaller script installs modules using their CPAN names.


/usr/local/cpanel/scripts/perlinstaller Module::Name

If you run the script without arguments, it opens an interactive CPAN shell. You may also use the --force flag to ignore errors, though this may install broken modules.


2.3 Install via cpan Command


The cpan command directly invokes the CPAN utility.


cpan Module::Name

3. Install Modules to the cPanel Perl Environment


The cPanel-included Perl environment is located at /usr/local/cpanel/3rdparty/bin/perl. To install modules here, use the cpanm script.


/usr/local/cpanel/bin/cpanm -i Module::Name

This method requires minimal interaction and is the fastest way to install modules.


4. Confirm Module Installation


4.1 Check System Perl


/usr/bin/perl -MModule::Name -e 'print $Module::Name::VERSION . "\n"'

4.2 Check cPanel Perl


/usr/local/cpanel/3rdparty/bin/perl -MModule::Name -e 'print $Module::Name::VERSION . "\n"'

Both commands return the installed module’s version number.


5. Manage Installed Modules


The perlmods script helps manage installed modules.


  • -l: List all installed modules
  • -s: Search for a module
  • -u: Uninstall a module

6. Troubleshooting Perl Module Issues


6.1 Check Error Logs


Perl-related errors are logged at:


/usr/local/cpanel/logs/error_log

6.2 Use strace for Deeper Debugging


For errors not logged normally, use strace:


strace -s 4096 -fvt -o /root/strace.issue.at.hand -p `cat /var/run/cpsrvd.pid`

6.3 Fix @INC Errors


An @INC error means Perl cannot locate the module. The error message lists the directories it searched.


Solutions include:


  • Placing the module in one of the listed @INC paths
  • Creating a symlink from an @INC path to the module location
  • Fixing build-time issues in the module

View Current @INC Paths


perl -V

This command displays the current @INC paths.


Conclusion


Installing and managing Perl Modules in cPanel & WHM involves multiple methods for both the system Perl and the cPanel Perl environments. With WHM tools, command-line utilities, and proper troubleshooting techniques, you can reliably deploy and maintain Perl modules across your server.


Written & researched by Dr. Shahin Siami

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue