http://www.perlmonks.org?node_id=1027353


in reply to Re^2: cpan fails when MKS installed on Windows
in thread [Solved]: cpan fails when MKS installed on Windows

I guess MKS runs its own config scripts at cmd.exe startup or windows startup somewhere (not sure)

That's an abominable state of affairs !! Is perl itself crippled by this affliction ?
For example, does perl -e "print $^X" output C:Perl64perlbinperl.exe, or is it just the cpan shell that suffers ?

If the problem is limited to the cpan shell you might be able to work around the problem by simply not using it.
I *never* use the cpan shell - in fact I won't even use cpan.pm (or any of its variants) unless the module I'm trying to install has an appallingly long list of pre-requisites.

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: cpan fails when MKS installed on Windows (HKCU\Software\Microsoft\Command Processor)
by Anonymous Monk on Apr 07, 2013 at 14:49 UTC

    That's an abominable state of affairs !! Is perl itself crippled by this affliction ?

    everything is affected, its a registry hack

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

    But that "feature" has got to be one of the dumbest malware/jokes msdn played

      everything is affected, its a registry hack

      Clearly $^X is not affected.
      I think the OP's problem might have no relation to the presence of MKS. Instead, it could be the Makefile that ExtUtils:MakeMaker has generated - which perhaps (or not) goes back to a %Config setting.

      Over the years, I've seen similar errors where MKS is *not* present, but I don't think I've ever quite got on top of how the error arises, or precisely what to do to fix it.

      I'm referring to a problem that turns up from time to time with DIRFILESEP.
      If the OP is still interested, he might verify that the Makefile generated during the building of the module contains:
      DIRFILESEP = \\
      Cheers,
      Rob

        Clearly $^X is not affected. ...

        $^X is not cmd.exe

        makemaker/dmake/cpan... all call the shell for one reason or another

        The shell is cmd.exe

        The shell is

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

        You could change it to "cmd /d /c" or "cmd /e:off /c" or some such, but I've never seen it used in real life

        It might work

Re^4: cpan fails when MKS installed on Windows
by prashantktyagi (Scribe) on Apr 07, 2013 at 13:19 UTC
    Here is output:
    C:\Users>perl -e "print $^X" C:\Perl64\perl\bin\perl.exe C:\Users>
    But I tried without cpan shell using source. and I am able to write Makefile but dmake.exe gives same error.
    C:\Perl64\cpan\build\Perl-Tidy-20121207-joTgGx>dmake C:Perl64perlbinperl.exe: not found dmake: Error code 255, while making 'blib\lib\Perl\.exists'

      Are you sure that MKS does not come with its own version of Perl?

      This really feels to me as if the MKS-supplied Perl uses libraries/files like Config.pm for the Strawberry Perl. I would take extra care that no trace of the MKS tools can be found while running a different Perl than the one supplied by MKS.

        Are you sure that MKS does not come with its own version of Perl?
        Yes, MKS Toolkit comes with own version of perl. But latest MKS 9.4 ships very old version of Perl (v5.8) .
        I haven't installed MKS Perl by customized installation.

      Why not use mksperl?

        I want to use Latest Perl v5.16 and with mksperl I have to use supplied Perl version only.