Installing a Perl moduleThis 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 or 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.0WinZip 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: ftp://ftp.info-zip.org/pub/infozip/ This bug has something to do with POSIX style paths. RepositoriesHere is a list of repositories I know about:
Yes, I'm sure there are many more. Installing a Unix-style distribution from CPANYou can download Unix-style distros of my modules from CPAN or via http://savage.net.au/Perl-modules.html 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.
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 distroYou 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=http://savage.net.au/Perl-modules/ppm 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 distroFirstly, download DBIx-Admin-TableInfo-1.00.zip from some repository. Now, run these commands: shell>cd temp shell>unzip DBIx-Admin-TableInfo-1.00.zip 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 AutomaticallyYou 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 ManuallyIf you wish to use ppm to reinstall a module without running 'ppm remove', you must edit 1 file and delete 2 others:
DocumentationAll 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. http://savage.net.au/Perl.html AuthorRon Savage. Home page: http://savage.net.au/index.html
LicenceAustralian 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: http://www.opensource.org/licenses/index.html |
Top of page |