X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCPAN.pm;h=887d5cd3c43f625dabf3214180e6d08362e72a36;hb=9e01bed8b6dd351933b88ffcf539432d47e152bc;hp=56d2e63831490b5045d759589e17d2d96f4f680c;hpb=35576f8caf9e62e75a38a8f05aa95936515d9620;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/CPAN.pm b/lib/CPAN.pm index 56d2e63..887d5cd 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -1,11 +1,12 @@ # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- package CPAN; -$VERSION = '1.70_54'; -# $Id: CPAN.pm,v 1.404 2003/05/15 20:43:14 k Exp $ +$VERSION = '1.76_01'; +$VERSION = eval $VERSION; +# $Id: CPAN.pm,v 1.412 2003/07/31 14:53:04 k Exp $ # only used during development: $Revision = ""; -# $Revision = "[".substr(q$Revision: 1.404 $, 10)."]"; +# $Revision = "[".substr(q$Revision: 1.412 $, 10)."]"; use Carp (); use Config (); @@ -2187,7 +2188,7 @@ sub get_basic_credentials { return unless $proxy; if ($USER && $PASSWD) { } elsif (defined $CPAN::Config->{proxy_user} && - defined $CPAN::Config->{proxy_pass}) { + defined $CPAN::Config->{proxy_pass}) { $USER = $CPAN::Config->{proxy_user}; $PASSWD = $CPAN::Config->{proxy_pass}; } else { @@ -2212,6 +2213,21 @@ sub get_basic_credentials { return($USER,$PASSWD); } +# mirror(): Its purpose is to deal with proxy authentication. When we +# call SUPER::mirror, we relly call the mirror method in +# LWP::UserAgent. LWP::UserAgent will then call +# $self->get_basic_credentials or some equivalent and this will be +# $self->dispatched to our own get_basic_credentials method. + +# Our own get_basic_credentials sets $USER and $PASSWD, two globals. + +# 407 stands for HTTP_PROXY_AUTHENTICATION_REQUIRED. Which means +# although we have gone through our get_basic_credentials, the proxy +# server refuses to connect. This could be a case where the username or +# password has changed in the meantime, so I'm trying once again without +# $USER and $PASSWD to give the get_basic_credentials routine another +# chance to set $USER and $PASSWD. + sub mirror { my($self,$url,$aslocal) = @_; my $result = $self->SUPER::mirror($url,$aslocal); @@ -3961,7 +3977,7 @@ sub get { } $self->{'build_dir'} = $packagedir; - $self->safe_chdir(File::Spec->updir); + $self->safe_chdir($builddir); File::Path::rmtree("tmp"); my($mpl) = File::Spec->catfile($packagedir,"Makefile.PL"); @@ -5427,7 +5443,7 @@ sub cpan_file { } return "Contact Author $fullname <$email>"; } else { - return "UserID $userid"; + return "Contact Author $userid (Email address not available)"; } } else { return "N/A";