Installing CPAN Perl Modules

Installing CPAN Perl Modules

Many of Dada Mail's most advanced features rely on additional code libraries, called CPAN Perl Modules to be installed and available on the web server that Dada Mail runs on. These features are usually entirely optional, meaning Dada Mail will run just fine without them, but your experience will be greatly enhanced if they are available.

Usually, if a feature is unavailable because of a missing CPAN Perl module: there will be an alert either in the included Dada Mail Installer where you would initially configure this feature; or from within the list control panel, where you would enable/work the feature.

Dada Mail does already ship with many included CPAN Perl modules, but it can't ship with all of them, as they could potentially need additional configuration, a dependency outside of Dada Mail's or Perl's immediate ecosystem, or code compilation.

Modules usually shipped with Dada Mail are listed in, Bundle::DadaMail::IncludedInDistribution:

https://metacpan.org/pod/Bundle::DadaMail::IncludedInDistribution

Other modules required for Dada Mail to run (and which we assume are already available) are listed in Bundle::DadaMail:

https://metacpan.org/pod/Bundle::DadaMail

Optional modules that enhance Dada Mail are listed in, Bundle::DadaMailXXL:

https://metacpan.org/pod/Bundle::DadaMailXXL

In this FAQ, we're going to focus on using the cPanel Perl Module Installer, which may be available to you, if you're running a hosting account powered by cPanel.

Method #1: Using the cPanel Perl Module Installer to install Bundle::DadaMail

Note: you may need a VPS or Dedicated hosting plan to be allowed to install CPAN Perl Modules from your cPanel. You may get a report that C compiler support is not available on an inexpensive shared hosting account. You may be able to contact your hosting account support to have them enable the C compiler, by putting you in the, Compiler group (which is terminology used by companies such as Bluehost).

We're going to go ahead and install Bundle::DadaMailXXL which will give us all the optional modules that Dada Mail uses.

Log into your cPanel. Search for, Perl Modules


Perl Modules

Click this icon.

Scroll down, and find the form labeled, Install a Perl Module. In this form field, type in: Bundle::DadaMailXXL, then click: Install Now


Install a Module

The process of fetching the module and installing it will then commence. Prepare to wait a few minutes, as the process does take a little time.

A lot of diagnostics will be printed out, much of which you may ignore, unless the install doesn't work correctly. One reason the installation of a module will fail is because a compiler is not available. If you're on a shared host, you may be out of luck, unless your hosting support can help. If you have more control over your account, like access to WHM, you can turn on complier support in there.

Once the process is completed, click the button labeled, Go Back at the bottom of the screen (or generally: go back to the Perl Modules screen), and scroll below the, Install a Perl Module form, where the table of Installed Perl Module(s) is located. It should now be populated with many of the different Perl modules Dada Mail can now use.

Method #2: use cpanm to install CPAN Perl Modules

cpanm is a command line CPAN Perl module installer. If you have ssh access to your account (this may require you to contact support to enable this). You can install cpanm, then install CPAN Perl modules this way. Here's how:

First, ssh into your hosting account. In this example, I'll be ssh'ing into a Bluehost shared hosting account. I had to contact support first to enable ssh access:

        ssh myuser@mywebsite.com

myuser is the main username for my account; mywebsite.com is the name of my website associated with my account.

You will be asked to enter your password. Once you've successfully done that, you will be logged in and should see a prompt to issue further commands.

Install cpanm by issuing the following command:

        curl -L https://cpanmin.us | perl - App::cpanminus

Once installed, you're ready to use cpanm.

To install Bundle::DadaMailXXL type in the following command:

        cpanm Bundle::DadaMailXXL

This may take a little time to complete. You may get errors when running this about some modules not being able to be installed. You can try to install these modules individually to debug specific problems.

Use cpanm to also install individual modules - just replaced, Bundle::DadaMailXXL with whatever module you would like to install.

Other ways to install CPAN Perl Modules

If you're not, you may have to ask your hosting support to install these modules. If you have full access to your webserver, the traditional ways of installing CPAN Perl modules will work just fine for you - either using a package manager released by the vendor of your operating system, or by using the cpan or cpanm command line tools. It's a little trickier, but certainly not impossible, to install Perl module without root privileges, but you'll need access to your account via the command line.

Some resources:

http://perl-begin.org/topics/cpan/life-with-cpan/non-root/

https://github.com/miyagawa/cpanminus

http://stackoverflow.com/questions/2980297/how-can-i-use-cpan-as-a-non-root-user


Dada Mail Project

Download

Installation

Support