perl-diddler has asked for the wisdom of the Perl Monks concerning the following question:

Recently I setup a /home/perl with output dirs for various versions of perl builds under it, like (perl-5.10.1, perl-5.12.5, perl-5.16.3, ...etc). Each of those has a root-structured dir-struct under it... so looking in perl-5.10., I see:
Ishtar:perl/perl-5.10.1> tree -L 2 -A . +-- usr +-- bin +-- lib +-- man
To work with a given perl I can just adjust my path as in:
PATH="/home/perl/version/usr/bin:$PATH"

That works for testing... but one perl is also my system perl and under it I have along the lines of:

|-- bin -> /usr/bin |-- etc -> /etc |-- lib -> /usr/lib/perl5/ |-- man -> share/man |-- share -> /usr/share
The problem comes where some modules (e.g. spamassassin) are using perl's -V:prefix and end up embedding:
'home/perl/perl-5.MAJ.MIN/site_perl/5.MAJ.MIN
for their libs and an absolute path on the first line:
#!/home/perl/perl.5.xx.yy/usr/bin/perl

ICK!.... I just want libs to use /usr/bin/perl. and look for their libs in /usr/lib/perl5/site_perl/perl-5.MAJ.

IT seems like the ideal would be some way of telling perl to report it's information based on the path it was called from, -- not where it was built, but ihow do I change (or is it possible to change) the 'V:prefix' value when I have it running from the new location?

I'm sure there's some easy way to do it, but I wouldn't know where to begin looking...*sigh*--things are always easier to find when you know where they are.. ;-)

Thanks!

Replies are listed 'Best First'.
Re: How to change idea of perl's install PREFIX after compilation?
by Anonymous Monk on Mar 30, 2014 at 00:56 UTC
      I wasn't looking to change the source code -- or I don't understand the purpose of the grep?

      But looking at perlrun option to use a run-time config file might be the trick.. I.e. rebuild perl once to use a site-config, and that looks like it might to the trick...

      Thanks!

        I wasn't looking to change the source code -- or I don't understand the purpose of the grep?

        The purpose of grepping the source is to find what you're looking for, info on PREFIX ... as you can see from the results the perlfaq contains info on it among other places