in reply to perldoc GIT bash

Does the strawberry version of perldoc have a shebang line of #!/usr/bin/perl (I believe it does)?. What is happening is that the git shell is looking at the shebang line for the perldoc script which is first in your path. According to Unix semantics, it looks at the first line for the interpreter to run, which (according to your path) is the msys version installed with the git shell. So, you are running Strawberry's perldoc with the git shell (msys) perl, libraries, and other things.

I have not gotten around to checking and/or submitting a bug with strawberry for this yet, but in my opinion, the scripts should either be installed with the full path to the perl binary from the installation, or just #!perl. If the shebang is changed to #!perl, you need to ensure that the Strawberry perl is first in your path.

After checking my install, it appears that only some of the perl scripts in Strawberry's installation are configured with full paths for the shebang line, which causes its own set of issues. Those are the items that should have a bug attached to them, either in the package, or on Strawberry itself. (IMO, of course)

Update: Corrected post based on checking my current Strawberry install

--MidLifeXis

Replies are listed 'Best First'.
Re^2: perldoc GIT bash
by Anonymous Monk on Mar 28, 2014 at 18:56 UTC

    After checking my install, it appears that only some of the perl scripts in Strawberry's installation are configured with full paths for the shebang line, which causes its own set of issues. Those are the items that should have a bug attached to them, either in the package, or on Strawberry itself. (IMO, of course)

    Hmm, seeing how win32 perl doesn't rely on shebang, has cmd.exe as its shell ... where as msysgit (git-bash) comes with its own perl ... doesn't look like strawberryperl needs any bug reports regarding this

      Unless you are only using the shell from msys, and using the Strawberry perl installation. This is as the OP stated.

      I actually agree that Strawberry is not the proper place for the bug report. I would argue that it is a bug in the original packages that are included in the Strawberry distribution. Even if not on Strawberry with an msys shell, the same thing can happen with multiple perl installations under unix. If the shebang is hardcoded in the distribution and the installation script does not rewrite the shebang line to the full path of the perl installation it is installed into, the script will use the wrong perl when executing itself. Under unix, it appears that the script gets rewritten (at least what I could test). Under Strawberry, it does not look like it does.

      An interesting scenario probably best to be avoided.

      --MidLifeXis