On Fri, May 01, 2020 at 12:48:17PM +0300, Victor Wagner wrote: > Maybe. But probably original author of this code was afraid of using > too long chain of ->{} in the string substitution. > > So, I left this style n place. > > Nonetheless, using qq wouldn't save us from doubling backslashes.
Looking at this part in more details, I find the attached much more readable. I have been able to test it on my own Windows environment and the problem gets fixed (I have reproduced the original problem as well). -- Michael
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 72a21dbd41..6daa18f70e 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -498,7 +498,7 @@ sub mkvcbuild my $pythonprog = "import sys;print(sys.prefix);" . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; my $prefixcmd = - $solution->{options}->{python} . "\\python -c \"$pythonprog\""; + qq("$solution->{options}->{python}\\python" -c "$pythonprog"); my $pyout = `$prefixcmd`; die "Could not query for python version!\n" if $?; my ($pyprefix, $pyver) = split(/\r?\n/, $pyout);
signature.asc
Description: PGP signature