Created
March 1, 2010 10:09
-
-
Save rbo/318254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub get_proxy_credentials { | |
my $self = shift; | |
my ($user, $password); | |
if ( defined $CPAN::Config->{proxy_user} && | |
defined $CPAN::Config->{proxy_pass}) { | |
$user = $CPAN::Config->{proxy_user}; | |
$password = $CPAN::Config->{proxy_pass}; | |
return ($user, $password); | |
} | |
my $username_prompt = "\nProxy authentication needed! | |
(Note: to permanently configure username and password run | |
o conf proxy_user your_username | |
o conf proxy_pass your_password | |
)\nUsername:"; | |
($user, $password) = | |
_get_username_and_password_from_user($username_prompt); | |
return ($user,$password); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment