Entry
How do I add a Perl module on windows?
Aug 24th, 2009 07:48
Joe Bloggs, chat alarab, Ronan Oger, chat
Note: Installing a module using the methods below allows you to invoke
them through the
use modulename;
command. You can also simply download (pure-perl) modules to a local
directory and access them by using the following command:
use lib "directory/where/my/module/is";
The former is easier and more transportable while the latter is a good
work around for people who do not have the admininstrator rights
required to install modules to the perl core directories.
There are currently (as of Perl 5.6.1) two main ways to add a modules
to a windows installation of Perl. You can either use Active State's
PPM application or you can download the sources from anywhere you find
them (such as CPAN) and make them.
Installing a module using PPM:
This is the easiest way to install a module.
Make sure you already have perl or get it here:
http://www.activestate.com
Say you want to install the SVG module which you know is available at
http://roasp.com/PPM/SVG because you looked for it there.
On the dos shell command line:
C:\> ppm
PPM> set repository tmp http://roasp.com/PPM/SVG/
PPM> install SVG
PPM> quit
C:\>
Done.
Alternatively, say you are stuck behind a firewall and are unable to
access the module. Then, you will need to download the parts locally
and modify the ppd (perl package description) file slightly.
Go th http://roasp.com/PPM/SVG and download the SVG.ppd file. Open it
in a text editor.
here is what you see:
<SOFTPKG NAME="SVG" VERSION="2,25,0,0">
<TITLE>SVG</TITLE>
<ABSTRACT>SVG.pm is a perl extention to generate stand-alone or
inline SVG
(scaleable vector graphics) images using the W3C SVG xml
recommendation.
Refer to the pod for full documentation and an example script,
or to http://roasp.com/man/SVG.html
Homepage http://roasp.com/index.shtml?PPM</ABSTRACT>
<AUTHOR>Ronan Oger</AUTHOR>
<IMPLEMENTATION>
<OS NAME="MSWin32" />
<ARCHITECTURE NAME="MSWin32-x86-multi-thread" />
<CODEBASE HREF="SVG-2.25.tar.gz" />
</IMPLEMENTATION>
</SOFTPKG>
Save this file to a local directory, and download the file described in
the CDEBASE tag: <CODEBASE HREF="SVG-2.25.tar.gz" /> (in this case,
this is in the same directory as the ppd file was, and should therefore
be in the same file). In some cases, the CODEBASE tag points to a URL
and it needs to point to the local file on your machine.
Next, install with PPM:
C:\> ppm
PPM> set repository tmp the/path/where/my/files/were/saved/locally
PPM> install SVG
PPM> quit
C:\>
Done installing with PPM.
Installing with make.
Pick the drive and a folder in which you want to install Emacs. I'll
assume that it is C:\somedir, but you can choose a different one. If
you choose a different drive or a different folder, you'll need to
adapt the directions below accordingly.
Create an empty folder C:\somedir. At the DOS prompt in the C: drive,
type mkdir emacs.
Download the [module-name].tar.gz to C:\somedir\ by right-clicking on
the link. Make sure the entire file was downloaded without any network
errors. Use Save Link As... or Save Target As... The browser will save
the file using the name that appears in the underlined link. You'll
need to rename it to emacs.tar.gz with Windows Explorer.
Download and install the Borland C++ compiler or any other compiler
http://www.borland.com/cbuilder/cppcomp/
Download gunzip-1.2.4-i386.exe
ftp://ftp.cs.washington.edu/pub/ntemacs/20.7/utilities/i386/gunzip-
1.2.4-i386.exe or equivalent to C:\emacs\gunzip.exe by right-clicking
on the link. Use Save Link As... or Save Target As... The browser will
save the file using the name that appears in the underlined link.
You'll need to rename it to gunzip.exe with Windows Explorer.
Download and install nmake.exe V1.5 (this is the windows equivalent to
unix's make utility. (After installing it, I copy it to make.exe so I
don't get confused)
http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-
US/Nmake15.exe
Download and install tar-1.11.2-i386.exe
ftp://ftp.cs.washington.edu/pub/ntemacs/20.7/utilities/i386/tar-1.11.2-
i386.exe to C:\somedir\tar.exe by right-clicking on the link.
Open up a DOS window (Start > Programs > Command Prompt) and follow the
instructions below:
(Assuming you are starting from c:\drive)
c:>gunzip -c -d [module-name].tar.gz
This decompresses the .gz binary file to .tar clear-text archived file
c:>tar -xvf [module-name].tar
This untars the file into a directory tree named [module-name]
c:>cd [module-name]
This goes into the directory
c:\[module-name]>perl Makefile.PL
This configures the installation parameters for your machine
c:\[module-name]>nmake
This builds the module in a temporary place
You can now use the module with the
use lib "path/to/[module-name]"
command (way) above.
c:\[module-name]>nmake test
This tests for errors., If you get errors here, then the module may
install badly (depending on the errors being generated). If there are
errors (sometimes they are cryptic) then you should try to address
them. Ignoring the errors might not be a problem.
c:\[module-name]>nmake install
This installs the module to the Perl core, allowing you to now use it
without using the use lib command (way) above.
You are done.
http://www.ksa-123.com
http://www.ksa-2000.com
http://www.chat-kuwait.com
http://www.vip-kuwait.com
http://www.chat-3rb.com
http://www.vip-3rb.com
http://www.3rb-chat.com
http://www.vipgulf.com
http://www.chat-gulf.com
http://www.vip-gulf.com
Note:
If you are trying to install perl modules which contain C XS code (Such
as the encryption libraries for example) that needs to be compiled,
then you might need to have installed a C compiler. I use Borland C,
which is free, but you can use anything at all. Installing the compiler
is simply a question of having it and installing it using the setup.exe
or equivalent. Make sure you install it to an easy-to-remember path as
the windows command line is not intellingent about complex path names.
======================================
http://www.attorneyslawyersdirectory.com
http://www.findattorneyslawyers.com
http://www.goodlawyersattorneys.com
http://www.professionallawyersattorneys.com
http://www.bestprofessionallawyers.com
http://www.americalawyersattorneys.com
http://www.availablelawyers.com
http://www.lawyersattorneyslist.com
http://www.lawyersattorneysfirm.com
http://www.originallawyers.com
http://www.lawyersgulf.com
http://www.lawyersband.com
http://www.lawyersdatacenter.com
http://www.lawyerstigers.com
http://www.lawcliff.com
http://www.tidylawyers.com
http://www.lawyersblock.com
http://www.californialawyersattorneys.com
http://www.chicagoattorneyslawyers.com
http://www.goodcalifornialawyers.com
http://www.lawyersattorneysfaqs.com
http://www.divorceattorneyslawyers.com
http://www.duiattorneyslawyers.com
http://www.personalinjurylawyerslist.com
http://www.injurylawyersattorneys.com
http://www.dwilawyersattorneys.com
http://www.healthbigboss.com
http://www.healthdohealth.com
http://www.healthcass.com
http://www.healthsilence.com
http://www.healthpicnic.com
http://www.blackmesothelioma.com
http://www.affordablelawyersattorneys.com
http://www.pickarticles.com
http://www.bloodyarticles.com
http://www.healthment.com
http://www.healthbyhealth.com
http://www.ehealthebooks.com
http://www.bestproductsofhealth.com
http://www.dietlosingweight.com
http://www.americanehealth.com
http://www.healthydepartment.com
http://www.medicalehealth.com
http://www.healthservicescenter.com
http://www.ehealthenews.com
http://www.ehealthdept.com
http://www.benefitshealthcenter.com
http://www.toplawyersattorneys.com
http://www.healthxhealth.com
http://www.mesotheliomakiller.com
http://www.healthinhealth.com
http://www.booksyshop.com
http://www.mesotheliomaout.com
http://www.mesotheliomadown.com
http://www.qwesz.com
http://americanahost.com
http://www.healthfirewall.com
http://www.healthbodyguard.com
http://www.flathealth.com
http://www.computerstan.com
http://www.financestan.com
http://www.technologystan.com
http://www.zobab.com
http://www.businessian.com
http://www.tarabiza.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.hantira.com
http://www.mantofa.com
http://www.tantofa.com
http://www.fantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.uploadarticles.com
http://www.articlesfreedirectory.com
http://www.articlesxarticles.com
http://www.shikapika.com
http://www.ganazat.com
http://www.stakoza.com
http://www.stupidarticles.com
http://www.damima.com
http://www.halazona.com
http://www.best-cheap-web-hosting.com
======================================