Reputation: 25117
Supposing I have one perl
in /usr/bin
(which came along with my os-distribution) and another one (build form the source) in /usr/local/bin
– is there a simple way to make a module available to both perl-installations with only one cpan; install module-name
?
Upvotes: 2
Views: 176
Reputation: 4115
As long as you put the module in a place where both Perls can find it in their include path, for instance via the environment variable PERL5LIB, it should just work.
You could define a separate directory for these shared modules and tell cpan to install into this directory. See the excellent Using CPAN with a non-root account for how to do that. Then add this directory to both Perls' PERL5LIB.
Upvotes: 4