diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 20:36:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 20:36:51 +0000 |
commit | d87737098aa3752eef064f4ae46efc75f2e59d80 (patch) | |
tree | 0104967207d3c230a4ebb21768425a1255a25142 /lib/CPAN | |
parent | e5edeb50dffa2b3a1d6245f54a443cff2a31eb3f (diff) | |
download | perl-d87737098aa3752eef064f4ae46efc75f2e59d80.tar.gz |
Upgrade to CPAN 1.59_51, from Andreas König.
p4raw-id: //depot/perl@7946
Diffstat (limited to 'lib/CPAN')
-rw-r--r-- | lib/CPAN/FirstTime.pm | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm index 6548a3fd7d..7cf01cd20c 100644 --- a/lib/CPAN/FirstTime.pm +++ b/lib/CPAN/FirstTime.pm @@ -17,7 +17,7 @@ use FileHandle (); use File::Basename (); use File::Path (); use vars qw($VERSION); -$VERSION = substr q$Revision: 1.50 $, 10; +$VERSION = substr q$Revision: 1.51 $, 10; =head1 NAME @@ -421,8 +421,26 @@ sub conf_sites { } my $loopcount = 0; local $^T = time; + my $overwrite_local = 0; + if ($mby && -f $mby && -M _ <= 60 && -s _ > 0) { + my $mtime = localtime((stat _)[9]); + my $prompt = qq{Found $mby as of $mtime + + I\'d use that as a database of CPAN sites. If that is OK for you, + please answer 'y', but if you want me to get a new database now, + please answer 'n' to the following question. + + Shall I use the local database in $mby?}; + my $ans = prompt($prompt,"y"); + $overwrite_local = 1 unless $ans =~ /^y/i; + } while ($mby) { - if ( ! -f $mby ){ + if ($overwrite_local) { + print qq{Trying to overwrite $mby +}; + $mby = CPAN::FTP->localize($m,$mby,3); + $overwrite_local = 0; + } elsif ( ! -f $mby ){ print qq{You have no $mby I\'m trying to fetch one }; |