in reply to Install CPAN module without root perminssions

When running perl on the Makefile.PL, add prefix=/dir/to/install. So if you wanted to install to /home/guest, run

perl Makefile.PL PREFIX=/home/guest

Then either set the PERL5LIB environment variable before you run the script or say use lib '/home/guest';

Replies are listed 'Best First'.
Re: Install CPAN module without root perminssions
by crenz (Priest) on Apr 14, 2003 at 18:36 UTC

    use lib '/home/guest';

    FYI, that never worked for me. When using PREFIX=/home/guest, I have to mention the explicit module base path (not the prefix used) in PERL5LIB or use lib qw(...). E.g.

    use lib '/home/guest/lib/site_perl/5.6.1';
      My thanks to everyone.
      Hopefully I will get it working.
      I have having similar problems. I have a sort of add-on question to post, though.

      I don't have permissions to the directory where perl is installed. I want to keep all of my modules I need in a separate directory. I can do a "perl Makefile.PL PREFIX=/to/my/dir", that's fine, but after I do a "perl make", and a "perl test", I try and do a "perl install". This tries to do something back in the original perl directory where I don't have permissions.

      Is it possible to "install" the modules in my own directory so that it doesn't ever "touch" the original perl directory? I thought that was what the PREFIX was for when I originally did a "perl Makefile.PL PREFIX...", is that wrong?
        The make install should install to the PREFIX you specified in your perl Makefile.PL.
        I had the same problem. Maybe you should just delete the stuff you "un-tarred"
        and "un-tar" it again to make sure you are doing a clean perl Makefile.PL PREFIX=/whatever
        What is the perl module?

        I second LameNerd's opinion. I've never had make install install anywhere else than my home directory. Which module are you talking about?

Re: Re: Install CPAN module without root perminssions
by Improv (Pilgrim) on Apr 14, 2003 at 18:30 UTC
    Also, if you invoke your script with Perl directly, you could do:
    perl -I/home/guest myscript.pl