Subject: | Config.pm specifies incorrect filename for user-configuration file |
The Config.pm built by cpan reports that that "user-config file is being looked for" is
~/.cpan/CPAN/MyConfig.pm
At least on OS X, this is incorrect and misleading; the correct file is
~/Library/Application Support/.cpan/CPAN/MyConfig.pm
(Because HandleConfig::home() returns the directory ~/Library/Application Support/.cpan.)
The attached patch fixes this.
See also #26912.
Subject: | handleconfig.patch |
*** /Users/mjs/scratch/HandleConfig.pm 2007-12-22 17:13:53.000000000 +0000
--- HandleConfig.pm 2007-12-22 17:58:20.000000000 +0000
***************
*** 289,300 ****
}
my $msg;
$msg = <<EOF unless $configpm =~ /MyConfig/;
# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
! # ~/.cpan/CPAN/MyConfig.pm.
EOF
$msg ||= "\n";
--- 289,301 ----
}
my $msg;
+ my $home = home();
$msg = <<EOF unless $configpm =~ /MyConfig/;
# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
! # $home/.cpan/CPAN/MyConfig.pm.
EOF
$msg ||= "\n";