Expand Your Perl Environment with CPAN

Perl is a versatile programming language, especially well-known for its strengths in text processing and system administration. Through the Perl Modules feature, you have direct access to CPAN (Comprehensive Perl Archive Network), a massive library containing thousands of ready-made modules that you can use in your own scripts.

Good to know: Modules save time. Instead of developing functions for database access or network protocols yourself, simply install the appropriate CPAN module.

Installing New Modules

You can add modules to your account in three ways:

  • Direct Installation: Enter the exact name of the module and click "Install Now".
  • Search: Use the search function to look for specific functionalities or keywords within CPAN.
  • Catalog: Use "Show Available Modules" to see a list of the most common extensions.

Integrating Modules into Your Scripts

For your Perl scripts to find locally installed modules, you must correctly specify the Include Path. cPanel displays this path at the top of the interface.

Add the following code block to the beginning of your Perl script (example):

use lib '/home/youruser/perl5/lib/perl5';
use Name::Of::Module;

Managing Your Installed Packages

Use the installed modules table to maintain control over your extensions:

Action Description
Update Checks CPAN for a newer version of the module.
Reinstall Performs a fresh installation if the module has errors.
Uninstall Safely removes the module from your directory.
Documentation Opens the official CPAN guide for this module.
System Modules: Click the "Show System Installed Modules" button to see which libraries are already provided globally by the server. You can use these, but you cannot delete them.

Are you having trouble compiling a module?
Some Perl modules require specific system libraries. In this case, please contact our support.

Was this answer helpful? 0 Users Found This Useful (0 Votes)