Perl Tutorial

 

Table of Contents

Adding Modules using the PPM

What is the Perl Package Manager?

One of the great strengths of Perl is the wealth of free modules you can use to extend the core Perl distribution. ActivePerl includes a package manager, the PPM, that makes it easy to browse, download and update Perl modules from module repositories on the Internet. These modules are added to the core Perl distribution installed on your system when you install ActivePerl.

Top

Running the Perl Package Manager

In this case, we will install a Perl module.

  1. Open the Run Command dialog box. Select Tools|Run Command.
  2. In the Run field, enter the command:

    perl -v

    ...and click Run. The Command Output window will open and display the version of Perl on your system. If you are running Perl 5.6.x, enter the following command (ensure that there are no spaces between, before and after the colons):

    ppm install Text::CSV_XS

    If you are running Perl 5.8.x, enter the following command:

    ppm install text-csv_xs

  3. Click the Run button to run the command. PPM will connect with the default repository on the ASPN network, download the necessary files, and make a record of the installation of the new package.
Top

Things to note about using PPM

  • "ppm" is the command that runs ActivePerl's Perl Package Manager. You can enter ppm at the command prompt, and then type "help" for a list of PPM commands.
  • PPM, by default, accesses the Perl Package repository stored on ASPN, the ActiveState Programmer Network. The ASPN repository is a "mirror" (that is, a copy), of CPAN, the Comprehensive Perl Archive Network.
  • More information about PPM is available on ASPN. PPM documentation is also included with your ActivePerl distribution.

Top Home Next