Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Toc no bullet

Overview

cPanel & WHM includes several Perl environments. The version of cPanel & WHM that you use determines the Perl environments on your server.  

Note
titleNote:

While cPanel & WHM's installer requires basic Perl, cPanel & WHM does not require the /usr/bin/perl file in order to function. cPanel & WHM's codebase and the /usr/bin/perl file interact minimally.

Perl environments

Select the tab for your version of cPanel & WHM to view the available Perl environments on your server:

Include Page
LIB:_PerlEnvironments
LIB:_PerlEnvironments

Custom modules in cPanel & WHM

We regularly update cPanel & WHM's internal Perl. However, these updates may impact your custom Perl modules.

cPanel & WHM version 70 and later

Include Page
LIB:_CustomModules70
LIB:_CustomModules70

cPanel & WHM version 62 through 68

Include Page
LIB:_CustomModules62
LIB:_CustomModules62

cPanel & WHM version 56 through 60

Include Page
LIB:_CustomModules56
LIB:_CustomModules56

cPanel & WHM version 11.46 through 54

Include Page
LIB:_CustomModules
LIB:_CustomModules

Perl script modifications to use cPanel's Perl environments

Warning
titleWarning:

If your distribution’s core Perl does not provide Perl modules, you may need to change the shebang (#) at the top of your scripts.

Change your shebang if any of the following statements are true:

  • Your scripts need to work on prior versions of cPanel & WHM.
  • Your maintenance scripts tie in to the cPanel & WHM codebase.
  • You want to use Perl 5.14 or later.

We recommend the following option to change the shebang (#!/usr/bin/perl) at the beginning of your script.

Modification to function on cPanel & WHM version 11.36 and later only

If the script must only function in cPanel & WHM version 11.36 and later, replace the shebang at the beginning of your script with the following shebang:

Code Block
languageperl
#!/usr/local/cpanel/3rdparty/bin/perl


Note
titleNote:

The /usr/local/cpanel/3rdparty/bin/perl symlink points to the location of Perl on the server. We do not recommend that you use the binary to which the symlink points, as it may move in future versions of cPanel & WHM.


Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "perl" and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "perl" and label = "cpanel" and space = "ALD"


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "perl" and label = "whm" and space in (currentSpace(),"ALD")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "perl" and space = "DD"