问题
After solving a few issues, I've Succeeded with CPAN on my Work Windows 7 Machine with DwimPerl via perl -MCPAN -e shell
and o conf init /proxy/
ftp:
http: http://192.168.1.1:8080
no:
Username: Chris@work
Password: SuperDeDuperSecretPassword
CPAN works. I'm able to install/build.
It seems that no matter what I do, CPANM doesn't want to get past the proxy:
C:\>cpanm WWW::Mechanize
! Finding WWW::Mechanize on cpanmetadb failed.
501 protocol scheme 'wwwproxy.work.com' is not supported
C:\> cpan WWW::Mechanize
...
...
...
c:\Programs\Dwimperl\c\bin\dmake.exe INSTALL -- OK
What's different between the two and what would cause CPAN to succeed while CPANM fails with a 501?
回答1:
10 minutes after I posted this, I had a brief conversation with a coworker. He mentioned environment variables. I verified that I had indeed added Windows Environment variables previously. A quick update to them:
User Variables for Chris:
HTTP_Proxy: http://192.168.1.1:8080
HTTP_proxy_pass: SuperDeDuperSecretPassword
HTTP_proxy_user: Chris@Work
I changed it from wwwproxy.work.org
to http://192.168.1.1:80
(CPAN complained without the HTTP, so I think it needed the full URL as well).
AND I had a typo in my name :(
CPANM works now.
来源:https://stackoverflow.com/questions/29636778/perl-windows-cpanm-proxy-issue