Upgrade to CPAN-1.87_62
[p5sagit/p5-mst-13.2.git] / lib / CPAN / HandleConfig.pm
index 588b15b..5b3c296 100644 (file)
@@ -2,7 +2,7 @@ package CPAN::HandleConfig;
 use strict;
 use vars qw(%can %keys $VERSION);
 
-$VERSION = sprintf "%.6f", substr(q$Rev: 740 $,4)/1000000 + 5.4;
+$VERSION = sprintf "%.6f", substr(q$Rev: 809 $,4)/1000000 + 5.4;
 
 %can = (
         commit   => "Commit changes to disk",
@@ -18,6 +18,9 @@ $VERSION = sprintf "%.6f", substr(q$Rev: 740 $,4)/1000000 + 5.4;
                              "bzip2",
                              "cache_metadata",
                              "check_sigs",
+                             "colorize_output",
+                             "colorize_print",
+                             "colorize_warn",
                              "commandnumber_in_prompt",
                              "cpan_home",
                              "curl",
@@ -53,12 +56,15 @@ $VERSION = sprintf "%.6f", substr(q$Rev: 740 $,4)/1000000 + 5.4;
                              "password",
                              "prefer_installer",
                              "prerequisites_policy",
+                             "proxy_pass",
+                             "proxy_user",
                              "scan_cache",
                              "shell",
                              "show_upload_date",
                              "tar",
                              "term_is_latin",
                              "term_ornaments",
+                             "test_report",
                              "unzip",
                              "urllist",
                              "username",
@@ -89,7 +95,7 @@ sub edit {
     $o = shift @args;
     $DB::single = 1;
     if($can{$o}) {
-       $self->$o(args => \@args);
+       $self->$o(args => \@args); # o conf init => sub init => sub load
        return 1;
     } else {
         CPAN->debug("o[$o]") if $CPAN::DEBUG;
@@ -141,6 +147,7 @@ sub edit {
         } else {
            $CPAN::Config->{$o} = $args[0] if defined $args[0];
            $self->prettyprint($o);
+            return 1;
        }
     }
 }
@@ -445,17 +452,18 @@ sub load {
 
     }
     local($") = ", ";
-    $CPAN::Frontend->myprint(<<END) if $redo && ! $theycalled;
+    if ($redo && ! $theycalled){
+        $CPAN::Frontend->myprint(<<END);
 Sorry, we have to rerun the configuration dialog for CPAN.pm due to
 the following indispensable but missing parameters:
 
 @miss
 END
+        $args{args} = ["\\b".join("|",@miss)."\\b"];
+    }
     $CPAN::Frontend->myprint(qq{
 $configpm initialized.
 });
-
-    sleep 2;
     CPAN::FirstTime::init($configpm, %args);
 }
 
@@ -521,13 +529,25 @@ sub cpl {
     if (
        defined($words[2])
        and
+        $words[2] =~ /list$/
+        and
        (
-        $words[2] =~ /list$/ && @words == 3
+        @words == 3
         ||
-        $words[2] =~ /list$/ && @words == 4 && length($word)
+        @words == 4 && length($word)
        )
        ) {
        return grep /^\Q$word\E/, qw(splice shift unshift pop push);
+    } elsif (defined($words[2])
+             and
+             $words[2] eq "init"
+             and
+            (
+             @words == 3
+             ||
+             @words == 4 && length($word)
+            )) {
+       return sort grep /^\Q$word\E/, keys %keys;
     } elsif (@words >= 4) {
        return ();
     }
@@ -552,7 +572,7 @@ package
 
 use strict;
 use vars qw($AUTOLOAD $VERSION);
-$VERSION = sprintf "%.2f", substr(q$Rev: 740 $,4)/100;
+$VERSION = sprintf "%.2f", substr(q$Rev: 809 $,4)/100;
 
 # formerly CPAN::HandleConfig was known as CPAN::Config
 sub AUTOLOAD {