in reply to Unable to use Module::Starter::AddModule under windows

'.' is not recognized as an internal or external command

Corion has correctly identified the source of the problem, though I don't think it has anything to do with the path separator. Rather, it's a command beginning with "." that the the Windows Cmd.exe shell can't handle.

I expect (untested) that it should be fine if you replace:
system( './Build', 'manifest' );
with
system($^X, './Build', 'manifest' );
or with just
system($^X 'Build', 'manifest' );

Best,I think, to also open an issue about this.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Unable to use Module::Starter::AddModule under windows
by Corion (Patriarch) on Aug 01, 2018 at 07:00 UTC

    Just a minor correction to your good and portable solution:

    cmd.exe can handle commands starting with ".", but dot as the current directory needs to be followed by a backslash and the filename to run:

    .\cpanm

    The above launches cpanm.cmd (if it exists) from the current directory.

      but dot as the current directory needs to be followed by a backslash

      Yes, you're right - I should have double checked.
      Thanks for correcting my incorrection.

      Cheers,
      Rob
Re^2: Unable to use Module::Starter::AddModule under windows
by BillKSmith (Monsignor) on Aug 01, 2018 at 03:10 UTC
    Thanks for the 'fix', it works perfectly. Reporting an 'issue' will be a new experience for me. I'll give it a try tomorrow.

    UPDATE: Issue submitted.

    Bill