The way the command is invoked from an executable extension has changed between V10 and V11. Note that in Perl the variable $EXECUTABLE_NAME contains the name of the program that was used to invoke the currently running perl script as passed to the program via arguments. For the purposes of this test, the script config.pl is little more than:
use English;
print "\$EXECUTABLE_NAME=$EXECUTABLE_NAME\n";
In V10, whether invoked from an executable extension (first case) or directly using perl (second case) the value passed is the file name of the perl interpreter.
>ver
TCC 10.00.76 Windows XP [Version 5.1.2600]
>\cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
>perl \cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
However in V11, for the executable extension it is 'TCC'.
>ver
TCC 11.00.31 Windows XP [Version 5.1.2600]
>\cmd\Config\Config.pl
$EXECUTABLE_NAME=TCC
>perl \cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
This obviously revolves around how the arguments are passed to the Windows routine that starts processes (CreateProcess if I'm not mistaken). I need to have the name of the perl interpreter in some of my scripts to ensure that child scripts are invoked with the same version of the interpreter that was used for the parent script.
use English;
print "\$EXECUTABLE_NAME=$EXECUTABLE_NAME\n";
In V10, whether invoked from an executable extension (first case) or directly using perl (second case) the value passed is the file name of the perl interpreter.
>ver
TCC 10.00.76 Windows XP [Version 5.1.2600]
>\cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
>perl \cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
However in V11, for the executable extension it is 'TCC'.
>ver
TCC 11.00.31 Windows XP [Version 5.1.2600]
>\cmd\Config\Config.pl
$EXECUTABLE_NAME=TCC
>perl \cmd\Config\Config.pl
$EXECUTABLE_NAME=C:\perl\bin\perl.exe
This obviously revolves around how the arguments are passed to the Windows routine that starts processes (CreateProcess if I'm not mistaken). I need to have the name of the perl interpreter in some of my scripts to ensure that child scripts are invoked with the same version of the interpreter that was used for the parent script.