# 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
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 \
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)) {
}
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})){
$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.
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){
#-> 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