Solved

How to configure CPAN in perl under WinXp??

Posted on 2006-06-29
6
830 Views
Last Modified: 2008-01-09
How do I configure CPAN in perl under WinXp ? please respone as soon as possible...

thanks,
0
Comment
Question by:arijit_rebaca
  • 3
  • 2
6 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 17011119
Are you using activestate perl?  If so, you can use ppm to get packages.

If you want to be able to download source code from CPAN, you need to have a compiler.  Do you have one?
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 50 total points
ID: 17011224
First you need to download Microsoft's nmake15.exe program (compiler); it's a self-extracting zip file. When it's executed, it will create 3 files on your disk (nmake.exe, nmake.err, and readme.txt). Move nmake.* to c:\perl\bin, which should be on the path.

ftp://ftp.microsoft.com/softlib/mslfiles/nmake15.exe

This next step isn't required, but I recommend it because it installs several utilities that aide cpan in the installation of modules; utilities such as;
gzip.EXE
lynx.EXE
less.EXE
tar.exe
unzip.exe
wget.exe

Download/install Cygwin.
http://www.cygwin.com/

Next, start the cpan shell

perl -MCPAN -e shell

The first time you enter the shell, it will ask if you're ready to start the manual configuration.  Answer "yes" and it will "walk" you through its configuration.  Just accept the defaults to most of the settings, but you may need to supply some path info if it can't find some of the utilities.
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 17011250
If it helps, here's my config that you can use as a guide.

cpan> o conf
CPAN::Config options from C:/Perl/lib/CPAN/Config.pm:
    commit             [Commit changes to disk]
    defaults           [Reload defaults from disk]
    help               [Short help about 'o conf' usage]
    init               [Interactive setting of all options]

    build_cache        [10]
    build_dir          [C:\.cpan\build]
    bzip2              []
    cache_metadata     [1]
    cpan_home          [C:\.cpan]
    curl               []
    dontload_hash
    ftp                [C:\WINDOWS\system32\ftp.EXE]
    ftp_passive        [1]
    ftp_proxy          []
    getcwd             [cwd]
    gpg                []
    gzip               [C:\Cygwin\bin\gzip.EXE]
    histfile           [C:\.cpan\histfile]
    histsize           [100]
    http_proxy         []
    inactivity_timeout [0]
    index_expire       [1]
    inhibit_startup_message [0]
    keep_source_where  [C:\.cpan\sources]
    lynx               [C:\Cygwin\bin\lynx.EXE]
    make               [C:\perl\bin\nmake.exe]
    make_arg           []
    make_install_arg   [UNINST=1]
    makepl_arg         []
    mbuild_arg         []
    mbuild_install_arg [--uninst 1]
    mbuildpl_arg       []
    ncftpget           [C:\Cygwin\bin\ncftpget]
    no_proxy           []
    pager              [C:\Cygwin\bin\less.EXE]
    prefer_installer   [EUMM]
    prerequisites_policy [follow]
    scan_cache         [atstart]
    shell              [C:\WINNT\system32\cmd.exe]
    show_upload_date   [1]
    tar                [C:\Cygwin\bin\tar.exe]
    term_is_latin      [1]
    unzip              [C:\Cygwin\bin\unzip.exe]
    urllist
        [ftp://theoryx5.uwinnipeg.ca/pub/CPAN/]
        [ftp://cpan.sunsite.ualberta.ca/pub/CPAN/]
        [ftp://ftp.nrc.ca/pub/CPAN/]
        [ftp://cpan.chebucto.ns.ca/pub/CPAN/]
    wget               [C:\Cygwin\bin\wget.exe]
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:arijit_rebaca
ID: 17015523
Hi  FishMonger ,


up to
Download/install Cygwin.
http://www.cygwin.com/

it has done. But from then I con't the cpan shell. How I do it?

thanks,
0
 

Author Comment

by:arijit_rebaca
ID: 17015527
I con't start the CPAN shell. How I do it?
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 17016301
You start the cpan shell by executing the perl command I showed from the command prompt, like this.

C:\>perl -MCPAN -e shell
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now