in reply to Relocatable Perl

Windows Perl has always been relocatable, in the sense that you can move perl.exe and its accompagnying files into any directory you like.

The configuration used by Perl and CPAN is a second matter, and they are mostly patched by some script in the distribution. The two main files to look at are Config.pm (and thus, Config_heavy.pl) and CPAN/Config.pm , as these contain absolute paths.

Replies are listed 'Best First'.
Re^2: Relocatable Perl
by LanX (Saint) on Apr 15, 2017 at 02:30 UTC
    > Windows Perl has always been relocatable, in the sense that you can move perl.exe and its accompagnying files into any directory you like

    At least regarding ActiveState Perl this is not 100% correct.

    There are various hard coded paths in the distribution making maintenence after the move kind of complicated.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Re^2: Relocatable Perl
by mfort (Novice) on Apr 15, 2017 at 05:10 UTC

    When you say 'they are mostly patched by some script in the distribution', what script in the core perl distribution are your referring to?

    I looked for anything in the bin directory that looked like it would relocate the installation, but found nothing. Remember, I am using the raw perl source and building myself.

      Weird - I was certain that Perl now included its own script to patch the absolute paths in the relevant files, but it seems no such thing is in the Perl core.

      You could look at what Portable::Dist does to patch a Perl distribution, or what ActiveState does and replicate that.