http://qs1969.pair.com?node_id=682084


in reply to Re: Installing modules to a private module directory
in thread Installing modules to a private module directory

i didn't find one in your blog.
Did you actually try this? I did, and it fails, for reasons I did explain in the blog. ("...the first thing everyone says is that you can just set PREFIX to X. No, because...")
  • Comment on Re^2: Installing modules to a private module directory

Replies are listed 'Best First'.
Re^3: Installing modules to a private module directory
by Mutant (Priest) on Apr 22, 2008 at 08:08 UTC

    Instead of PREFIX, you can use INSTALL_BASE, which I believe is now the perferred option for Module::Build and ExtUtils::MakeMaker (so long as you have up-to-date versions of both). I haven't had a problem with this, altho I haven't installed all of CPAN with it.

    You still run into the problem of setting your @INC, since things seem to randomly install in a subdirectory called either 'site_perl', 'perl5' or '5.x.x', meaning you have to add 3 entries to your @INC. This can be annoying if your paths can change depending on the box you're working on.

Re^3: Installing modules to a private module directory
by tinita (Parson) on Apr 22, 2008 at 08:15 UTC
    Did you actually try this?
    otherwise i wouldn't ask.
    maybe i just don't get it, but it has always worked for me to install my modules with setting PREFIX and LIB. i just asked for an example. show me a module where it doesn't work. that's all i asked for. i would be really interested because i use the PREFIX/LIB method for my cgipan script and i would like to correct it if it has got a mistake.
    in your blog you gave the reason why it doesn't work to set PREFIX. but you didn't say that using PREFIX and LIB together fails.

      You might try DBI. That seems to be at least one example case, based on the context given in his blog.

        You might try DBI.
        it works here on my machine:
        $ perl Makefile.PL PREFIX=/tmp/foo LIB=/tmp/foo/lib $ make $ make install $ perl -wle' use lib "/tmp/foo/lib"; use DBI; print $INC{"DBI.pm"}' /tmp/foo/lib/i486-linux-gnu-thread-multi/DBI.pm