X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installman;h=8f6bd80d2aadbc3a3d75e955563af1aa0d4ae258;hb=e25a7dc23f32d0dd4f1c4c8645877a39bdb9d4b7;hp=d27271e687180826db25407ecbaee8decb59c724;hpb=02bc0c09b2a02ba62249521fe20a53b8d033c440;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installman b/installman index d27271e..8f6bd80 100755 --- a/installman +++ b/installman @@ -1,6 +1,32 @@ #!./perl -w BEGIN { @INC = qw(lib) } use strict; + +BEGIN { + use Config; + if ($Config{userelocatableinc}) { + # This might be a considered a hack. Need to get information about the + # configuration from Config.pm *before* Config.pm expands any .../ + # prefixes. + # + # So we set $^X to pretend that we're the already installed perl, so + # Config.pm doesits ... expansion off that location. + + my $location = $Config{initialinstalllocation}; + die <<'OS' unless defined $location; +$Config{initialinstalllocation} is not defined - can't install a relocatable +perl without this. +OS + $^X = "$location/perl"; + # And then remove all trace of ever having loaded Config.pm, so that + # it will reload with the revised $^X + undef %Config::; + delete $INC{"Config.pm"}; + delete $INC{"Config_heavy.pl"}; + # You never saw us. We weren't here. + } +} + use Config; use Getopt::Long; use File::Find;