Search code examples
gitperlhp-ux

specifying the right perl version for git


We want to install git on our system which runs HP UX 11.31 and the standard version of Perl (5.8.8e) which comes with the system. It is of utmost importance that the perl command keeps referring to Perl 5.8.8e so that our scripts run fine.

Git has a dependency on Perl 5.28. Mind, it was working fine with Perl 5.8.8e but we'd rather not risk running into issues later, so we installed it in a separate folder.

Now how can we make sure that git uses the correct version of Perl?


Solution

  • The Perl scripts that Git runs begin with #! lines. In the Git source, these lines read #!/usr/bin/perl, but as you build Git to install it, the source-builder replaces these with the correct path. So if the correct path for a correct version of Perl is /usr/local/bin/perl, tell the build to use that; if it's /compat/perl5.28, tell the build to use that, and so on.