Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change CPAN config

Status
Not open for further replies.

hmerrill

Programmer
Dec 4, 2000
473
US
I'd like to change my CPAN config - by CPAN I mean the cpan utility you can use to automatically install modules from The problem is when I do

perl -MCPAN -e shell

cpan> install Some::Module

it goes through each of my selected mirror sites, first trying to use LWP to download the file, and then trying Net::FTP - and when it's gone through the whole list of sites trying those 2 options, only then will it start going through the list of sites again using "ncftpget". Probably because of some corporate firewall stuff, ncftpget is the only option that works. Is there a way to change my CPAN config file so that cpan will only try ncftpget? Trying LWP and Net::FTP wastes a lot of time.

Thanks. Hardy Merrill
 
start up the cpan shell then type
Code:
o conf init
This will take you through the cpan interactive config again. When it prompts you for a download method that you don't want to use hit spacebar and then enter. This will disable their use.

jaa
 
I thought you had it, but even after doing that, it still tries LWP first, and Net::FTP next.

It seems to "learn" for the *current* cpan session - 1st it goes through the whole list of sites trying LWP and Net::FTP, and then it tries ncftpget. After that install is finished, while I'm still in that cpan session, every install after that it goes right to ncftpget.

Any idea how to make it go to ncftpget *every* time - even the 1st time for a cpan session? Hardy Merrill
 
The answer turned out to be

export FTP_PASSIVE=1

in a session as the "root" user, and then starting up the
CPAN session by

perl -MCPAN -e shell

That seems to enable "passive" ftp's, which allows LWP to work properly. The issue is a firewall issue - this solves it. Hardy Merrill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top