On Aug 24, 2006, at 5:04 PM, Doug McNutt wrote:
I guess I wasn't clear. I want the modules installed in my $HOME
directory so that they won't
1) Get lost when a newer OS gets installed - especially with Linux.
2) Get in the way of someone else's, the main geek - my wife's,
idea of what should be there.
What you're looking for is http://search.cpan.org/~andk/CPAN-1.87/lib/
CPAN.pm#5 :
I am not root, how can I install a module in a personal directory?
First of all, you will want to use your own configuration, not the
one that your root user installed. If you do not have permission to
write in the cpan directory that root has configured, you will be
asked if you want to create your own config. Answering "yes" will
bring you into CPAN's configuration stage, using the system config
for all defaults except things that have to do with CPAN's work
directory, saving your choices to your MyConfig.pm file.
You can also manually initiate this process with the following
command:
% perl -MCPAN -e 'mkmyconfig'
or by running
mkmyconfig
from the CPAN shell.
You will most probably also want to configure something like this:
o conf makepl_arg "LIB=~/myperl/lib \
INSTALLMAN1DIR=~/myperl/man/man1 \
INSTALLMAN3DIR=~/myperl/man/man3"
You can make this setting permanent like all o conf settings with o
conf commit.
You will have to add ~/myperl/man to the MANPATH environment
variable and also tell your perl programs to look into ~/myperl/
lib, e.g. by including
use lib "$ENV{HOME}/myperl/lib";
or setting the PERL5LIB environment variable.
While we're speaking about $ENV{HOME}, it might be worth
mentioning, that for Windows we use the File::HomeDir module that
provides an equivalent to the concept of the home directory on Unix.
Another thing you should bear in mind is that the UNINST parameter
can be dangerous when you are installing into a private area
because you might accidentally remove modules that other people
depend on that are not using the private area.
--
Packy Anderson
[EMAIL PROTECTED]
La perfection est atteinte non quand il ne reste rien ‡ ajouter, mais
quand
il ne reste rien ‡ enlever.
(You know you've achieved perfection in design, not when you have
nothing
more to add, but when you have nothing more to take away.)
--Antoine de Saint-
Exupery