On Thu Feb 03 11:29:17 2011, chris@bingosnet.co.uk wrote:
Show quoted text> On Thu, Feb 03, 2011 at 09:13:32AM -0500, Leandro Hermida via RT
> wrote:
> > Hi,
> >
> > CPANPLUS seems to have hardcoded somewhere to always look for
> > $HOME/.cpanplus even if you change base using s conf. This makes it
> a
> > pain to manage multiple CPANPLUS installs when you are managing more
> > than one Perl installation (e.g. different versions) as they both
> want
> > to use the same $HOME/.cpanplus. It would be nice if CPANPLUS could
> use
> > $base/.cpanplus instead then nothing would clobber anything else.
> >
>
> This is a chicken and egg situation.
>
> base is stored in the configuration file, so how do we find the
> configuration
> file to find where we should find the configuration file.
>
> Exactly.
>
> You can take advantage of the APPDATA environment variable to change
> where
> it locates the .cpanplus directory.
>
> or see CPANPLUS::Config::BaseEnv module on CPAN.
>
> Cheers,
Hi Chris,
Thank you very much what you suggested works.
To solve the chicken-egg problem maybe doing it the way CPAN does it
would work? With CPAN you don't have this problem because the default
global configuration file is located with the library e.g.
/home/hermida/soft/perl/5.12.3/lib/5.12.3/CPAN/Config.pm so it doesn't
need to read the config file to get cpan_home to find the location of
config file. Then you could have a user-specific CPAN configs with
$cpan_home/CPAN/MyConfig.pm