-Duserelocatableinc

brian_d_foy on 2008-01-07T19:38:00

One feature I like in Perl 5.10 is relocatable @INC support. From the commit by Nicholas "You can install things to the current location of the perl tree, move it, install more things, move it again, lather rinse repeat".

mkdir tmp && cd tmp
wget http://www.cpan.org/src/perl-5.10.0.tar.gz
tar fzx perl-5.10.0.tar.gz
cd perl-5.10.0
sh Configure -de -Dprefix=/home/acme/perl_5_10_0 -Duserelocatableinc
make && make test && make install
/home/acme/perl_5_10_0/bin/perl -e 'use feature qw(say); say "hi"'
mv /home/acme/perl_5_10_0 /home/acme/newpath_perl_5_10_0
/home/acme/newpath_perl_5_10_0/bin/perl -e 'use feature qw(say); say "hi"'
# etc.


Relocatable yes

n1vux on 2008-01-08T04:04:11

Yes indeed. I've been waiting for this since it was cut from 5.7.x's todo list. (I just wish it would be the default, so we could clone AIX, Solaris, Linux distroy Perl's and not just our local builds.)

(ActiveState Perl has been relocatable for years.)

For 5.8.x, I had to hack a perl script to edit the binary tree to relocate Perl's at $DayJob -- which only works if it's going to a shorter path, and /usr/bin/perl is shorter than any place IT will let us install an App-private Perl.

Re:Relocatable yes

Alias on 2008-01-08T07:29:45

One thing I don't understand about the relocation thing is how you can do relocatable Config.pm, CPAN::Config.pm etc...