use strict;
use vars qw(%can %keys $dot_cpan $VERSION);
-$VERSION = sprintf "%.2f", substr(q$Rev: 488 $,4)/100;
+$VERSION = sprintf "%.6f", substr(q$Rev: 581 $,4)/1000000 + 5.4;
%can = (
- 'commit' => "Commit changes to disk",
- 'defaults' => "Reload defaults from disk",
- 'init' => "Interactive setting of all options",
+ commit => "Commit changes to disk",
+ defaults => "Reload defaults from disk",
+ help => "Short help about 'o conf' usage",
+ init => "Interactive setting of all options",
);
-%keys = map { $_ => undef } qw(
- build_cache build_dir bzip2
- cache_metadata commandnumber_in_prompt cpan_home curl
- dontload_hash
- ftp ftp_passive ftp_proxy
- getcwd gpg gzip
- histfile histsize http_proxy
- inactivity_timeout index_expire inhibit_startup_message
- keep_source_where
- lynx
- make make_arg make_install_arg make_install_make_command makepl_arg
- mbuild_arg mbuild_install_arg mbuild_install_build_command mbuildpl_arg
- ncftp ncftpget no_proxy pager
- prefer_installer prerequisites_policy
- scan_cache shell show_upload_date
- tar term_is_latin
- unzip urllist
- wait_list wget
-);
+%keys = map { $_ => undef } (
+ "build_cache",
+ "build_dir",
+ "bzip2",
+ "cache_metadata",
+ "commandnumber_in_prompt",
+ "cpan_home",
+ "curl",
+ "dontload_hash", # deprecated after 1.83_68 (rev. 581)
+ "dontload_list",
+ "ftp",
+ "ftp_passive",
+ "ftp_proxy",
+ "getcwd",
+ "gpg",
+ "gzip",
+ "histfile",
+ "histsize",
+ "http_proxy",
+ "inactivity_timeout",
+ "index_expire",
+ "inhibit_startup_message",
+ "keep_source_where",
+ "lynx",
+ "make",
+ "make_arg",
+ "make_install_arg",
+ "make_install_make_command",
+ "makepl_arg",
+ "mbuild_arg",
+ "mbuild_install_arg",
+ "mbuild_install_build_command",
+ "mbuildpl_arg",
+ "ncftp",
+ "ncftpget",
+ "no_proxy",
+ "pager",
+ "prefer_installer",
+ "prerequisites_policy",
+ "scan_cache",
+ "shell",
+ "show_upload_date",
+ "tar",
+ "term_is_latin",
+ "unzip",
+ "urllist",
+ "wait_list",
+ "wget",
+ );
if ($^O eq "MSWin32") {
for my $k (qw(
mbuild_install_build_command
} else {
$self->prettyprint($o);
}
- if ($o eq "urllist" && $changed) {
- # reset the cached values
- undef $CPAN::FTP::Thesite;
- undef $CPAN::FTP::Themethod;
+ if ($changed) {
+ if ($o eq "urllist") {
+ # reset the cached values
+ undef $CPAN::FTP::Thesite;
+ undef $CPAN::FTP::Themethod;
+ } elsif ($o eq "dontload_list") {
+ # empty it, it will be built up again
+ $CPAN::META->{dontload_hash} = {};
+ }
}
return $changed;
} elsif ($o =~ /_hash$/) {
sub help {
$CPAN::Frontend->myprint(q[
Known options:
- defaults reload default config values from disk
commit commit session changes to disk
+ defaults reload default config values from disk
+ help this help
init go through a dialog to set all parameters
-You may edit key values in the follow fashion (the "o" is a literal
-letter o):
-
+Edit key values as in the following (the "o" is a literal letter o):
o conf build_cache 15
-
o conf build_dir "/foo/bar"
-
o conf urllist shift
-
o conf urllist unshift ftp://ftp.foo.bar/
+ o conf inhibit_startup_message 1
]);
undef; #don't reprint CPAN::Config
}
-package ####::###### #hide from indexer
- CPAN::Config;
+package
+ CPAN::Config; ####::###### #hide from indexer
# note: J. Nick Koston wrote me that they are using
# CPAN::Config->commit although undocumented. I suggested
# CPAN::Shell->o("conf","commit") even when ugly it is at least
use strict;
use vars qw($AUTOLOAD $VERSION);
-$VERSION = sprintf "%.2f", substr(q$Rev: 488 $,4)/100;
+$VERSION = sprintf "%.2f", substr(q$Rev: 581 $,4)/100;
# formerly CPAN::HandleConfig was known as CPAN::Config
sub AUTOLOAD {