Development Guides Home >> Guide to Perl
Guide to Perl in cPanel - Custom Modules
Introduction
cPanel & WHM servers include multiple Perl environments. Your Perl modules can use these Perl environments, but they may require certain modifications in order to function correctly.
- For instructions to write your own Perl modules or UAPI functions, read our Custom UAPI Modules documentation.
- In some cases, you may need to modify a Perl script's shebang line. For more information, read our Modules and Scripts documentation.
Custom modules that ship with WHM
Our upgrades to Perl may break custom code and modules that you used in previous versions of cPanel & WHM.
cPanel & WHM ship with binaries that we compile against Perl version 5.36. This directly affects any custom Perl code that you execute from cPanel binaries. We strongly recommend that you test your plugins and hook code against Perl 5.36 to ensure that they work correctly.
Before you recompile all of your modules, check whether cPanel & WHM already includes your modules. With the addition of several modules to the list of modules that cPanel ships, we expect that cPanel & WHM ships with the majority of the modules that developers built with this tool.
- For a list of modules that cPanel currently ships, read our Third-Party Software documentation for the appropriate cPanel & WHM version.
- cPanel wants to ensure that we ship the modules that developers need. If you discover that cPanel & WHM does not ship with a CPAN module that you need, reach out to us in Discord .
While it is possible to install custom modules to the /opt/cpanel/perl5/514
/site_lib library with the /usr/local/cpanel/3rdparty/perl/514/bin/cpanm
command, this will cause further problems when cPanel switches to newer versions of Perl in the future..