Child pages
  • Guide to Perl in cPanel - Custom Modules
Skip to end of metadata
Go to start of metadata

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, particularly if you wrote the script for cPanel & WHM version 11.36 or earlier, 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 version 70 and later


Warning:

Our upgrades to Perl may break custom code and modules that you used in previous versions of cPanel & WHM. 

cPanel & WHM versions 70 and later ship with binaries that we compile against Perl version 5.26. This change 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.26 to ensure that they continue to work correctly.


Custom modules that ship with WHM version 62 through 68


Warning:

Our upgrades to Perl may break custom code and modules that you used in previous versions of cPanel & WHM. 

 cPanel & WHM versions 62 through 68 ship with binaries that we compile against Perl version 5.24. This change directly affects any custom Perl code that you execute from cPanel binaries. It is critical that you test your plugins and hook code against Perl 5.24 to ensure that they continue to work correctly.

Custom modules that ship with cPanel & WHM version 56 through 60


Warning:

Our upgrades to Perl may break custom code and modules that you used in previous versions of cPanel & WHM. 

cPanel & WHM versions 56 through 62 ship with binaries that we compile against Perl version 5.22. This change directly affects any custom Perl code that you execute from cPanel binaries. It is critical that you test your plugins and hook code against Perl 5.22 to ensure that they continue to work correctly.

Custom modules that ship with cPanel & WHM version 11.46 through 54


Warning:

Our upgrades to Perl may break custom code and modules that you used in previous versions of cPanel & WHM. 

cPanel & WHM versions 11.46 through 54 ship with binaries that we compile against Perl version 5.14.4. This change directly affects any custom Perl code that you execute from cPanel binaries. It is critical that you test your plugins and hook code against Perl 5.14.4 to ensure it continues to work correctly. Previously compiled custom modules, with the buildperl system, will not function properly in cPanel & WHM version 11.46 and later, because the system built the module against an older version of Perl.

 
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, send an email to integration@cpanel.net to request it.

    Note:

    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/cpan command, this will cause further problems when cPanel switches to newer versions of Perl in the future.