Subject: | CPAN: Bug in CPAN::HTTP::Credentials 1.9600 |
Date: | Thu, 27 Oct 2011 16:37:38 +0200 |
To: | bug-CPAN [...] rt.cpan.org |
From: | winfree [...] gmx.de |
Hi,
I updated several modules using the cpan shell, including CPAN itself.
I updated CPAN to 1.9800 and afterwards ran into problems.
(This happened with a Perl 5.12.x on Windows XP and with a Perl 5.14.x on Fedora 15)
My systems must use a proxy (without credentials) to access the internet, and since this update I cannot fetch any files via cpan shell. I get this message:
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/CPAN-Mini-1.111007.tar.gz
Catching error: "Undefined subroutine &CPAN::HTTP::Credentials::_clear_non_proxy_credentials called at D:\\perl\\perl\\lib/CPAN/HTTP/Credentials.pm line 10, <IN> line 1.\cJ" at D:/perl/perl/lib/CPAN.pm line 391
CPAN::shell() called at D:/perl/perl/lib/App/Cpan.pm line 295
App::Cpan::_process_options('App::Cpan') called at D:/perl/perl/lib/App/Cpan.pm line 364
App::Cpan::run('App::Cpan') called at D:\perl\perl\bin/cpan line 8
A manual downgrade to CPAN-1.9600 did not solve this.
I downloaded the CPAN-1.9800.tar.gz and checked the included files.
CPAN::HTTP::Credentials is included as Version 1.9600 which contains the
following code:
sub clear_credentials {
_clear_non_proxy_credentials();
_clear_proxy_credentials();
}
sub clear_non_proxy_credentials {
undef $USER;
undef $PASSWORD;
}
sub clear_proxy_credentials {
undef $PROXY_USER;
undef $PROXY_PASSWORD;
}
I modified the code and modified the sub declarations (I added the "_" to the function names) and afterwards I could use the cpan shell again.
So, I think the fix is to rename the two sub routines to:
sub _clear_non_proxy_credentials {
undef $USER;
undef $PASSWORD;
}
sub _clear_proxy_credentials {
undef $PROXY_USER;
undef $PROXY_PASSWORD;
}
Sorry for the bad style. I'm a little out of time and had to hurry ;)
Regards,
Linuxer
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone