Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 53635
Status: resolved
Worked: 5 min
Priority: 0/
Queue: CPANPLUS

People
Owner: BINGOS [...] cpan.org
Requestors: rkrimen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Allow $ENV{CPANPLUS_HOME} to override/indicate the home directory
Allow $ENV{CPANPLUS_HOME} to override/indicate the home directory So you could use something other than $HOME/.cpanplus
As I recall Jos resisted such a feature when I requested it, but we reached an accommodation wherein I created CPANPLUS::Config::BaseEnv which does allow one to specify through an environment variable the location where CPANPLUS will look for it's .cpanplus directory.
Subject: Re: [rt.cpan.org #53635] Allow $ENV{CPANPLUS_HOME} to override/indicate the home directory
Date: Wed, 13 Jan 2010 16:41:44 +0100
To: bug-CPANPLUS [...] rt.cpan.org
From: "Jos I. Boumans" <jos [...] dwim.org>
On Jan 13, 2010, at 3:56 PM, BINGOS via RT wrote: Show quoted text
> Queue: CPANPLUS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53635 > > > As I recall Jos resisted such a feature when I requested it, but we > reached an accommodation wherein I created CPANPLUS::Config::BaseEnv > which does allow one to specify through an environment variable the > location where CPANPLUS will look for it's .cpanplus directory.
Environment variables don't survive a 'save this config to disk', as they'll be interpolated with their values. The 'best' way is to write CPANPLUS::Config::* files, which will be picked up and evaluated where you can change anything you want, including the home directory. Bingos' solution is the right way to go. Cheers, -- Jos Boumans 'Real programmers use "cat > a.out"'
Show quoted text
> Bingos' solution is the right way to go.
Thanks for the quick replies, that works for me. I've included a patch for the FAQ covering this issue: =head1 How can I control the location of the CPANPLUS home directory ($HOME/.cpanplus) via the environment? Use L<CPANPLUS::Config::BaseEnv> An alternative approach is to write a CPANPLUS::Config::* file, which will be picked up and evaluated and where you can change anything you want, including the home directory.
Subject: cpanplusfaq.patch
@@ -10,6 +10,14 @@ XXX Work in progress +=head1 How can I control the location of the CPANPLUS home directory ($HOME/.cpanplus) via the environment? + +Use L<CPANPLUS::Config::BaseEnv> + +An alternative approach is to write a CPANPLUS::Config::* file, which will +be picked up and evaluated and where you can change anything you want, +including the home directory. + =head1 BUG REPORTS Please report bugs or other issues to E<lt>bug-cpanplus@rt.cpan.org<gt>.