Installing a module

Table of Contents

Installing a Perl module
WinZip 8.1 and 9.0
Installing a Unix-style distribution from CPAN
Installing a remote ActiveState ppm-style distro
Installing a local ActiveState ppm-style distro
Uninstalling Modules Automatically
Uninstalling Modules Manually

Installing a module

Installing a Perl module

This document describes various methods of installing Perl modules.

In all cases, the module DBIx::Admin::TableInfo V 1.00 will be used in the examples.

Also, in all cases, my web site will be used as the remote repository from which you can use ppm to install modules. Note: This just demonstrates the syntax of the commands. You can't actually install pre-compiled modules from my web site. I've deleted all such files since I switched from ActiveState Perl to Strawberry Perl.

The canonical way to install a module is to use the CPAN module which is shipped with Perl:

	shell>cpan DBIx::Admin::TableInfo
	shell>sudo cpan DBIx::Admin::TableInfo

The remainer of this document discusses other methods, including using ppm with remote repositories.

WinZip 8.1 and 9.0

WinZip 8.1 and 9.0 both contain an 'accidental' bug which stops them recognizing the directory structures of some valid *.tar files. You are better off using a reliable tool such as InfoZip:

This bug has something to do with POSIX style paths.


Here is a list of repositories I know about:

Yes, I'm sure there are many more.

Installing a Unix-style distribution from CPAN

You can download Unix-style distros of my modules from CPAN or via

If you download any Unix-style distro, you obtain a file with a name like DBIx-Admin-TableInfo-1.00.tar.gz or DBIx-Admin-TableInfo-1.00.tgz.

There is no difference between these 2 naming conventions, except that I prefer the latter one.

You need to run gunzip to unzip such files, and then run tar to untar them. Alternately, you could use WinZip if you are running under MS Windows.

If you wish to use the CygWin command line utilities gunzip and tar under MS Windows, instructions for downloading and installing them can be found here:

Now, run these commands:

	shell>gunzip DBIx-Admin-TableInfo-1.00.tgz
	shell>tar -mxvf DBIx-Admin-TableInfo-1.00.tar
	shell>cd DBIx-Admin-TableInfo-1.00

From here, there are 2 methods, depending on whether or not the module's author used Module::Build.

  • Using Module::Build

    On Unix-like systems:

    	shell>perl Build.PL
    	shell>./Build test
    	shell>./Build install

    On MS Windows-like systems:

    	shell>perl Build.PL
    	shell>perl Build
    	shell>perl Build test
    	shell>perl Build install

    On all systems:

    Run through you favourite pod2html translator.

  • The old way:
    	shell>perl Makefile.PL
    	shell>[dn]make test
    	Under Unix, switch to root to run the last command
    	shell>[dn]make install


    	[dn]make refers to the make program you use. It may be called make, dmake
    	or even nmake.
    	nmake for MS Windows is free, and can be downloaded from:

Note: Some versions of tar for DOS can handle -mxvzf, where the 'z' means run gunzip, so it does not need to be run separately.

Installing a remote ActiveState ppm-style distro

You can either install a module from a remote repository, or download it and install it from a local drive.

This section describes the remote technique, and the next describes the local variation.

Run this command:

	shell>ppm install --location= DBIx-Admin-TableInfo

Note: This line demonstrates the syntax, but as explained above section, you can't actually install any pre-compiled modules from my web site.

It is important to realize that when you use ppm remotely, you do not get any sub-directories which may be present in the Unix-style distro. These directories normally contain test files, examples and other stuff. That's why you should always download a distro (*.tgz or *.zip) and investigate it, even if you have installed it via ppm.

Installing a local ActiveState ppm-style distro

Firstly, download from some repository.

Now, run these commands:

	shell>cd temp
	shell>ppm install --location=. DBIx-Admin-TableInfo
	shell>del DBIx-Admin-TableInfo-1.00.ppd
	shell>del PPM-DBIx-Admin-TableInfo-1.00.tar.gz

Note: Older modules may ship everything in a sub-directory. This means that after the unzip command, you may need to do 'cd DBIx-Admin-TableInfo-1.00'.

Uninstalling Modules Automatically

You can either uninstall modules using ppm or manually.

This section describes the ppm method, and the next describes the manual method.

Run these commands:

	shell>ppm set confirm 0
	shell>ppm remove DBIx-Admin-TableInfo

I set confirm to 0 so that I can run 'ppm remove' from a CGI script.

Uninstalling Modules Manually

If you wish to use ppm to reinstall a module without running 'ppm remove', you must edit 1 file and delete 2 others:

  • File: /perl/site/lib/ppm.xml

    At the end, you will find an entry like this, possibly all on one line :-(:

    	<PACKAGE NAME="DBIx-Admin-TableInfo">
    	<INSTDATE>Tue Oct  1 11:46:37 2002</INSTDATE>
    	<SOFTPKG NAME="DBIx-Admin-TableInfo" VERSION="1,00,0,0">
    	<ABSTRACT>A wrapper around DBI's table_info() and column_info()</ABSTRACT>
    	<AUTHOR>Ron Savage (</AUTHOR>
    	<CODEBASE HREF="x86/DBIx-Admin-TableInfo-1.00.tar.gz" />
    	<INSTALL />
    	<UNINSTALL />

    Delete this entry, taking care to preserve the final token: </PPMCONFIG>.

  • File: /perl/site/lib/auto/DBIx/Admin/TableInfo/.packlist

    Delete this file.

  • File: /perl/site/lib/DBIx/Admin/

    Delete this file.


All good Perl modules come with embedded documentation, written in Perl's own documentation language POD.

Many users, and the module DBIx::Admin::TableInfo, run pod2html to turn a module's source file, *.pm, into its own documentation file, *.html. But pod2html output is fairly plain.


Ron Savage.

Home page:

  • Version: 1.01 01-Jun-2006

    This version disguises my email address.

  • Version: 1.00 18-Feb-2002

    Original version.


Australian Copyright © 2002 Ron Savage. All rights reserved.

	All Programs of mine are 'OSI Certified Open Source Software';
	you can redistribute them and/or modify them under the terms of
	The Artistic License, a copy of which is available at:
Top of page