in reply to Replicating perl instance on AIX 6.1

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

Replies are listed 'Best First'.
Re^2: Replicating perl instance on AIX 6.1
by twieckow (Novice) on Sep 02, 2015 at 14:55 UTC
    Corion, userelocatableinc came back "Unknown" when I issued the command you suggested; perl -V:userelocatableinc. so, would I then pursue your second suggestion of using PERL5LIB along with patching perl executable? Thank you

      Yes, that sounds like a plan. Also see the comments made by others in this thread.