http://qs321.pair.com?node_id=564046


in reply to Installing modules locally

Makefile.PL PREFIX=/home/gabor/perl5lib
just use:
Makefile.PL PREFIX=/home/gabor/perl5lib LIB=/home/gabor/perl5lib

At least this has been working well for me. All modules are now installed in the given directory instead of architecture-dependant ones and such and in the architecture dependant ones.
I am using this also in cgipan.

update: architecture-dependant directories are still used, but that's no problem for use lib. thanks to rinceWind for pointing that out.

Replies are listed 'Best First'.
Re^2: Installing modules locally
by rinceWind (Monsignor) on Jul 27, 2006 at 12:44 UTC

    I agree with that approach. Specifying both LIB and PREFIX works very well for me. I use install_base for Module::Build and anything that insists on it.

    All modules are now installed in the given directory instead of architecture-dependant ones and such.

    That's not strictly true. Pure perl modules will be installed generically to the lib directory. Modules containing XS (or Inline::C, swig, etc.) are still installed into architecture dependent paths, but this is what you want. Indeed, you can share the lib tree across platforms - I do this between Solaris and Windows, and it works too!

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)

Re^2: Installing modules locally
by szabgab (Priest) on Jul 27, 2006 at 13:36 UTC
    Oh, that seems like the good solution. I'll go and try it. I have about 400 modules installed already so I will wait a bit till all that comes back to my private perl5lib directory.

    I hope it will also work with Module::Build.....