I would approach the problem by inspecting the output of perl -V:userelocatableinc. If that is defined, you can simply copy perl and all files to a different directory and everything will use the paths from the new directory. You might need to edit lib/Config.pm and lib/CPAN/Config.pm to point to the new directories too.
If the Perl was not compiled with a relocatable @INC, then you will need to adjust the module search path for Perl. The easiest way is to set PERL5LIB to the wanted new paths. To be really certain that the new copy of Perl does not use old paths, you should patch the new Perl executable to remove all references to the old path. Ideally, you replace the path by something with exactly the same length, for example by using:
perl -nle 's!/usr/share/perl5!/usr/share/____5!g' /path/to/new/perl
In reply to Re: Replicating perl instance on AIX 6.1
by Corion
in thread Replicating perl instance on AIX 6.1
by twieckow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |