Solved

How to configure CPAN in perl under WinXp??

Posted on 2006-06-29
6
855 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl for loop for 2000 ms 7 109
perl script to check whether folder contains any files 5 98
Call Shell Script from Perl Script 6 164
Perl Snippet to Parse String 1 36
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…

749 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