From: Andreas J Koenig Date: Mon, 4 May 2009 06:23:18 +0000 (+0200) Subject: Update CPAN.pm to 1.93_53 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=94fe740e5ee75e09f4ebfa2b46529c18f028f00e;p=p5sagit%2Fp5-mst-13.2.git Update CPAN.pm to 1.93_53 --- diff --git a/lib/CPAN.pm b/lib/CPAN.pm index e7475b8..14243a8 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -2,7 +2,7 @@ # vim: ts=4 sts=4 sw=4: use strict; package CPAN; -$CPAN::VERSION = '1.93_52'; +$CPAN::VERSION = '1.93_53'; $CPAN::VERSION =~ s/_//; # we need to run chdir all over and we would get at wrong libraries @@ -3455,8 +3455,7 @@ You will most probably also want to configure something like this: INSTALLSCRIPT=~/myperl/bin \ INSTALLBIN=~/myperl/bin" -and then (oh joy) the equivalent command for Module::Build. That would -be +and then the equivalent command for Module::Build, which is o conf mbuildpl_arg "--lib=~/myperl/lib \ --installman1dir=~/myperl/man/man1 \ diff --git a/lib/CPAN/Distroprefs.pm b/lib/CPAN/Distroprefs.pm index 561137f..e1be9cd 100644 --- a/lib/CPAN/Distroprefs.pm +++ b/lib/CPAN/Distroprefs.pm @@ -326,7 +326,7 @@ CPAN::Distroprefs -- read and match distroprefs die $result->as_string if $result->is_fatal; - warn $result->as_string, next if $result->is_warning; + warn($result->as_string), next if $result->is_warning; for my $pref (@{ $result->prefs }) { if ($pref->matches(\%info)) { diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm index 9f0c695..8b5f6ba 100644 --- a/lib/CPAN/FirstTime.pm +++ b/lib/CPAN/FirstTime.pm @@ -1409,7 +1409,7 @@ Shall I use the local database in $mby?}; } local $urllist = $CPAN::Config->{urllist}; my $better_mby; - while () { # multiple errors possible + LOOP: while () { # multiple errors possible if ($use_mby or (defined $CPAN::Config->{connect_to_internet_ok} and $CPAN::Config->{connect_to_internet_ok})){ @@ -1432,12 +1432,12 @@ Shall I use the local database in $mby?}; $better_mby = CPAN::FTP->localize($m,$mby,3); $use_mby=1 if $mby; } else { - last; + last LOOP; } if ($better_mby) { $mby = $better_mby; } - } elsif (not @$urllist + } elsif (not @{$urllist||[]} and (not defined $CPAN::Config->{connect_to_internet_ok} or not $CPAN::Config->{connect_to_internet_ok})) { $CPAN::Frontend->myprint(qq{CPAN needs access to at least one CPAN mirror. @@ -1449,10 +1449,10 @@ a valid CPAN URL now.\n\n}); my $ans = prompt("Please enter the URL of your CPAN mirror",shift @default); if ($ans) { push @$urllist, $ans; - next; + next LOOP; } } else { - last; + last LOOP; } } if ($use_mby){ diff --git a/lib/CPAN/Module.pm b/lib/CPAN/Module.pm index f9520d9..eae5a73 100644 --- a/lib/CPAN/Module.pm +++ b/lib/CPAN/Module.pm @@ -652,10 +652,15 @@ sub available_version { #-> sub CPAN::Module::parse_version ; sub parse_version { my($self,$parsefile) = @_; - my $have = eval { MM->parse_version($parsefile); }; + alarm(10); + my $have = eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + MM->parse_version($parsefile); + }; if ($@) { $CPAN::Frontend->mywarn("Error while parsing version number in file '$parsefile'\n"); } + alarm(0); my $leastsanity = eval { defined $have && length $have; }; $have = "undef" unless $leastsanity; $have =~ s/^ //; # since the %vd hack these two lines here are needed