CPAN and XDG directories
[email protected] (Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯)
| Newsgroups | perl.cpan.workers |
|---|---|
| Message-ID | <[email protected]> |
CPAN prefers to use File::HomeDir to determine it own directory, so far that
has been `$HOME/.cpan`. F::H 0.90 adds XDG support, accordingly the directory
moved to a different location, except for the configuration file whose
location is sort of hard-coded if missing. cpan from App::Cpan allows the user
to name a configuration file, I had to tweak CPAN slightly to prefer
committing to that file if specified. I published the changes at
<http://github.com/daxim/cpanpm/commits>. (Pull request to andk coming soon.)
Together this made it possible for me to get rid of `$HOME/.cpan` altogether,
I keep CPAN's data now at standard-conformant locations in the file system.
> alias cpan
alias cpan='$HOME/local/bin/cpan -s -j $HOME/.config/cpan/Config.pm'
> ack HOME ~/.config/cpan/Config.pm
my $HOME = $ENV{HOME};
'build_dir' => qq[$HOME/.cache/cpan-build],
'cpan_home' => qq[$HOME/.local/share/cpan],
'histfile' => qq[$HOME/.local/share/cpan/histfile],
'keep_source_where' => qq[$HOME/.cache/cpan-sources],
'prefs_dir' => qq[$HOME/.local/share/cpan/prefs],
'urllist' => [ qq[file://$HOME/.cache/cpan-sources],
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEABECAAYFAkt8UcUACgkQFtlTdOX00HpJUwCgqpa3gwqm8ZbtlbSuK48r5VRQ RA8An1uxbPirBjeCSqyOWesdSZM71UAx =o5Se -----END PGP SIGNATURE-----