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],

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to