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);
}