Nor more sure that this is actually the solutionTurns out to be the same type of thing - thanks for the pointer.
Once I searched the Module::Build source for the string "Can't locate the perl binary", it all fell into place fairly quickly.
In Module/Build/Base.pm there's some checking goes on - looks like they're trying to verify that the perl being used is the first perl to be found in the path. (I don't know why that needs to be done ... I doubt that it does ... but maybe they're trying to check something else altogether...)
Everything's fine until Base.pm's _quoted_args() sub puts single quotes around
C:\MinGW\perl510\bin\perl.exe so that, instead of executing:
C:\MinGW\perl510\bin\perl.exe -MConfig=myconfig -e print -e myconfig
this gets executed:
'C:\MinGW\perl510\bin\perl.exe' -MConfig=myconfig -e print -e myconfig
which produces the
The filename,... error.
A simple
$cmd =~ s/'//g; just prior to the execution of $cmd fixes the problem.
It's interesting that the same version of Module::Build (ie 0.38) on perls 5.8.0, 5.8.9, 5.12.0 and 5.14.0 does not throw up this problem. I guess there's something specific to 5.10.0 that triggers the error.
Cheers,
Rob
Update: Originally copy'n'pasted the wrong string in a couple of places ... now fixed.