Adding Modules using the PPM
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
In this case, we will install a Perl module.
- Open the Run Command dialog box. Select Tools|Run Command.
- 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
- 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
- "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.
|