Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 23887
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: avar [...] f-prot.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [Patch] CPAN.pm 1.8802 dies with backtrace due to calling prompt() with an undefined value
Date: Mon, 11 Dec 2006 17:36:16 +0000
To: bug-cpan [...] rt.cpan.org
From: Ævar Arnfjörð Bjarmason <avar [...] f-prot.com>
Release 1.8802 of CPAN.pm contains a simple logic error in CPAN::LWP::UserAgent, the _get_username_and_password_from_user expects to be called with two arguments as $self->_get... but because it's called as _get_.. an undefined value gets passed to the subsequent prompt() call causing the user to be unable to install the CPAN module that required this dialog. The attached patch fixes the issue.
diff -ru CPAN-1.8802/lib/CPAN.pm CPAN-1.8802-frisk/lib/CPAN.pm --- CPAN-1.8802/lib/CPAN.pm 2006-10-23 06:52:04.000000000 +0000 +++ CPAN-1.8802-frisk/lib/CPAN.pm 2006-12-11 17:08:31.696625029 +0000 @@ -2605,7 +2605,7 @@ o conf proxy_pass your_password )\nUsername:"; ($user, $password) = - _get_username_and_password_from_user($username_prompt); + $self->_get_username_and_password_from_user($username_prompt); return ($user,$password); } @@ -2625,7 +2625,7 @@ )\nUsername:"; ($user, $password) = - _get_username_and_password_from_user($username_prompt); + $self->_get_username_and_password_from_user($username_prompt); return ($user,$password); }
Sorry for the late reply... I believe that the code in question has already been fixed in 1.88_65. Would you mind trying it? (apart from that, this is a duplicate of 23933) Thanks for the reportT
Subject: Re: [rt.cpan.org #23887] AutoReply: [Patch] CPAN.pm 1.8802 dies with backtrace due to calling prompt() with an undefined value
Date: Thu, 28 Dec 2006 14:05:43 +0000
To: bug-CPAN [...] rt.cpan.org
From: Ævar Arnfjörð Bjarmason <avar [...] f-prot.com>
I can confirm that ftp user/pass prompts work with CPAN-1.88_65 (7dec59a16543ed37053f1212d30b8c9d CPAN-1.88_65.tar.gz), the mirror I was using is ftp://ftp.cise.ufl.edu. Superfluous CPAN output (RET on user/pass dialog) """ Running install for module 'Pod::Xhtml' Running make for B/BB/BBC/Pod-Xhtml-1.52.tar.gz Fetching with LWP: ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/authors/id/B/BB/BBC/Pod-Xhtml-1.52.tar.gz Authentication needed! (Note: to permanently configure username and password run o conf username your_username o conf password your_password ) Username: Password: CPAN: Digest::SHA loaded ok (v5.44) Fetching with LWP: ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/authors/id/B/BB/BBC/CHECKSUMS """
Fixed in 1.88_65