When using cpan.bat the following may be helpful. Please note that this is for a Windows corporate network infrastructure and was tested using both Strawberry and Cygwin Perl in the current network environment where I work. YMMV!
BEWARE THAT THIS APPROACH STORES YOUR LAN PASSWORD ON YOU LOCAL HARD DISK. THIS IS INSECURE!
Step 1: Information Gathering
Step 2: Configure CPAN
- Discover the address of your proxy: If using a PAC file (look in IE Tools->Internet Options-> Connections -> LAN Settings and identify the setting 'Use automatic configuration script') then download the PAC file and open in a text editor. The default proxy address (e.g. proxy.corp) and port (e.g. 80) will probably be at the bottom of the PAC script. If you are not using a PAC script then the proxy address will be in the LAN Settings dialog.
- Know your domain name (e.g. corpdom) and lan ID (e.g. lanname)
- You will also need your lan password (e.g. secret)
[Update: July 2008 -- tested on Strawberry and Cygwin Perl. See also]
- From the command line ensure that you running the correct version of perl (perl --version)
- run the command cpan
- You may be asked some configuration questions -- answer as best you can and take defaults if not sure
- At the CPAN Prompt type the following commands:
o conf proxy_user corpdom\\lanname (NB Double slash required)
o conf proxy_pass secret
o conf ftp_proxy http://proxy.corp:80 (NB No trailling slash on URL)
o conf http_proxy http://proxy.corp:80 (NB No trailling slash on URL)
- Now try and install something (e.g.