Installing Perl modules

After you install Perl, you might need to install the Perl modules. If you are using the version of Perl provided by your operating system, you need to use the C compiler that was used to build Perl.

Before you begin

  • If you are using the operating system installation of Perl, you must have root access.
  • If you are using a custom installation of Perl, make sure that the Perl installation directory is the first directory in the PATH statement.

About this task

You can install the Perl modules with or without internet connection. If you do not have an internet connection for each of the servers in your IBM® Product Master installation, you can download the Perl modules from CPAN and then copy them to your servers for you to install. If you have an internet connection for each of the servers in your IBM Product Master installation, you can use the CPAN module that is part of your default Perl installation to download and install other Perl modules.

When you are configuring Product Master, your Perl installation is validated and any missing Perl modules are displayed.
You might want to download and use the Devel::Loaded module because it displays which modules you already have installed. After you install this module, enter the pmall command.
Note: If pmall is not in your PATH, it is located in the \bin directory in the root directory of your Perl installation. You can use the which perl command to find the location of the Perl interpreter in a Perl installation that is supplied by your operating system. The which perl command returns a syslink that points to the root of the Perl installation.
Currently, the following Perl modules are required:
  • Config::IniFiles (included with Product Master, no need to install this module separately)
  • Config::Properties (included with Product Master, no need to install this module separately)
  • File::Find
  • Getopt::Long
  • Net::Domain
  • File::Copy
  • File::Temp
  • File::Basename
  • IO::Handle
  • File::Path

Procedure

  1. Download the Perl modules from metacpan.
    You must review the dependencies for the modules and download all of those dependent modules that are not installed on your Product Master servers as well.
    Note: The home page of many modules on the CPAN site has a dependencies link that you can review to determine the dependencies of a module.
  2. For each of the modules that you downloaded, complete the following steps:
    1. Unpack it into a writable directory.
    2. Run the Perl configure command: perl Makefile.pl.
    3. Run the make command.
    4. Run the make test command.
      Do not proceed until this command completes successfully.
    5. Run the make install command.
  3. To install the Perl module with an internet connection, run the CPAN command.
    To run CPAN in a shell environment where you can run commands and respond to prompts, type cpan and press Enter. Or, you can run the following command to install specific modules and any of its dependent modules:
    perl –MCPAN –e'install <module_name>' 
    If you are running CPAN for the first time, you must configure CPAN. Accept all the default values when prompted. When configuration is complete, you are either given a prompt to initiate an action or the action that you already specified is initiated.