I am having a problem installing CPAN modules using strawberry perl 5.16.2.2 64 bit and later versions. When installing from CPAN dmake fails to build the module with the following error:
dmake.exe: Error executing 'C:\Windows\system32\cmd.exe; /c C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib\MIME': No such file or directory
dmake.exe: Error code -1, while making 'blib\lib\MIME\.exists'
After extensive research I have found that the fix for the problem is to add SHELL=cmd.exe to the top of the dmake Makefile file produced by perl Makefile.PL and then the module can be installed using
dmake
dmake install
The problem is that no CPAN modules will install automatically without attempting a CPAN install, editing the Makefile and running dmake manually in the cpan/build directory. Using an environment variable SHELL=cmd.exe or MAKESHELL=cmd.exe does NOT work, as the build does not run correctly if used.
Does anyone know a fix for why my Windows 7 64 bit machine has this problem?
Is there is any configuration for cpan or some other technique so that I dont have to manually edit and run the dmake makefile for every CPAN module for my strawberry perl installation?