0

I'm trying to run cpan App::cpanminus in 32-bit Strawberry Perl 5.18.2.2 and/or 5.20.2.1 and both instances fail with same error:

Here are last few lines of log:

Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for App::cpanminus
Writing MYMETA.yml and MYMETA.json
  MIYAGAWA/App-cpanminus-1.7030.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for M/MI/MIYAGAWA/App-cpanminus-1.7030.tar.gz
C:Strawberryperlbinperl.exe: not found
dmake.exe:  Error code 255, while making 'blib\lib\App\.exists'
  MIYAGAWA/App-cpanminus-1.7030.tar.gz
  C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Stopping: 'install' failed for 'App::cpanminus'.

Environment is XP SP3 running in Parallels vm 9.0.24251 on OS X 10.8.5. It's a long story why I run XP this way. Suffice it to say, I MUST. Strawberry Perl runs superbly, as good or better than native Perl 5.12.4 in OS X but the fact that I can't get cpan App::cpanminus to work makes me very, very uncomfortable. To paraphrase OJ: "if the gloves don't fit you can't convict" ... "if the script fails to build, you can't trust the sucker."

Notice how that error message squeezes out the slashes between dir nodes. I've coded $PATH with '/' and '\' and the error is the same.

I upgraded to 5.20 from 5.18 to see if that would fix problem. It didn't... so the problem almost certainly is in my environment... or it's pilot error :-(

Any ideas will be greatly appreciated and thank you for reading.

perlboy
  • 64
  • 7

2 Answers2

0

Do you have mks installed? To see if you do from cmd.exe try

reg query "HKCU\Software\Microsoft\Command Processor"

According to How can I make Strawberry Perl's cpan(1) find perl? mks sets a env var shell which you should disable before running cpan

set shell=

or if that doesn't work and its the cmd.exe extensions edit your perl Config ( lib\Config_heavy.pl ) to ignore/disable command extensions, meaning change it from

$ perl -V:sh
sh='cmd /x /c';

change into cmd /E:off /c aka cmd /y /c where it means /E:OFF Disable command extensions

Community
  • 1
  • 1
optional
  • 2,061
  • 12
  • 16
  • I screwed up that comment. Here is one that is more complete: Yes, MKS Toolkit is installed and typically I run the Korn shell with sh -KL. That reg query yielded CompletionChar 0x9, DefaultColor 0x0 and EnableExtensions 0x1. However, setting Shell= was the answer but the correct expression was "export Shell=". Thanks much for answering. I was about to find with grep to look for escape issues with dir separators. – perlboy Apr 22 '15 at 03:34
  • @perlboy, `set shell=` is the cmd shell syntax to clear an env var. `export shell=` is the `sh` shell syntax to clear an env var. – ikegami Apr 22 '15 at 14:05
0

Thank you @ikegami but I almost never run cmd.exe; always sh.exe, as @optional correctly inferred.