http://www.perlmonks.org?node_id=1179879


in reply to Common module lib across Perl versions on same system

If you're installing pure perl modules, then using a common install location will be ok for all perl installations. But that won't work if you're installing non pure perl modules. In those cases, you'll need to install/build them separately for each perl version.

.

Also, if you have multiple users, then you would not want to install the modules under %USERPROFILE%. Instead, you'll want to install them in a location where all users can access.

Replies are listed 'Best First'.
Re^2: Common module lib across Perl versions on same system
by bart (Canon) on Jan 18, 2017 at 23:06 UTC
    I think perls do have a built in support for both architecture-dependant and version-dependant directories (and both) in @INC. At least, I can see that support in lib. If I run the (private) sub lib::_get_dirs using
    perl -le "require lib; print for lib::_get_dirs()"
    I see:
    /MSWin32-x64-multi-thread/auto /MSWin32-x64-multi-thread /5.24.0 /5.24.0/MSWin32-x64-multi-thread
    These are subdirectories for each directory you add with use lib, that also get added to @INC.

    So... version dependent library roots are defenitely possible in a common library directory tree.

Re^2: Common module lib across Perl versions on same system
by VinsWorldcom (Prior) on Jan 18, 2017 at 23:15 UTC

    Thanks. Understood about XS modules - I know those won't work. This is on my own Windows box for my own development so no worry about %USERPROFILE% - not sharing with other users.