ID #1056

Perl on Windows: installing Perl modules via PPM

ActivePerl is a robust Perl platform for windows from ActiveState (and other platforms, but Windows is the main one that doesn't already come with Perl by default).

With their PPM (perl package manager) you can install lots of perl cpan-style libraries...

Note that, yes, you can still use the CPAN method:

CPAN: File::HomeDir loaded ok (v0.67)
cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled
cpan> install Bundle::CPAN
CPAN: Storable loaded ok (v2.16)
Going to read C:\Perl\cpan\Metadata
Database was generated on Mon, 17 Dec 2007 11:37:45 GMT
CPAN: LWP::UserAgent loaded ok (v2.036)
CPAN: Time::HiRes loaded ok (v1.9707)
Fetching with LWP:
CPAN: YAML loaded ok (v0.66)
Going to read ...

And so forth. But some of those require compilers and a development environment, whereas if you can install a package that's ready to rumble then you don't need to hassle with the development aspect of things.

If you launch PPM from the command line you get a nice interface for navigating, searching and so forth:


But there are also facilities to install via command-line arguments for speed and convenience (when unable to install via CPAN or via the PPM interface).

C:\> ppm install specific-package-name-here.ppm

So, for example, to install a DBD::mysql module that's not supported or endorsed or stable or dependable or even close to being a good idea to install, you download it, unpack it and then PPM install it...

Download PPM-ready packages from -- note that you'll need your perl version number to know which packages to download:

C:\>perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread

The important part is the minor version number: for 5.8.x that's 8, for 5.6.x that'd be 6, and so on. For our perl instance we need the "ActivePerl 8xx" packages.

Once you browse to the ZIP LISTINGS and find the package you want, download it, create a subdirectory for it, then unpack it in the subdirectory. The README file tells you how to install it:

C:\>cd DBD-mysql-3.0002
C:\DBD-mysql-3.0002>type README
To install this ActiveState PPM package, run the following command
in the current directory:
ppm install DBD-mysql.ppd

And that's what you do, and you're done!

The *.ppd files are actually XML-formatted instructions on what PPD needs to look for, where, and what to do with it. In no time, you'll have an unsupported module installed and ready to rumble!

Last update: 2007-12-26 15:33
Author: will trillich
Revision: 1.1

Print this record Print this record
Send to a friend Send to a friend
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 4.39 out of 5 (33 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry