title: Unable to install Time:Piece module with cpan
body: <p>I need to install the <code>Time::Piece</code> module in Perl. It's not there for some reason. When I use</p>
  
  <pre><code>cpan install Time::Piece
  </code></pre>
  
  <p>after some successful steps I get the error below</p>
  
  <pre><code>.....
  Checking if your kit is complete...
  Looks good
  Unable to find a perl 5 (by these names: "My windows path variable contents here...i think"
  Writing Makefile for Time::Piece
  'nmake' is not recognized as an internal or external command,
  operable program or batch file.
    RJBS/Time-Piece-1.29.tar.gz
    nmake -- NOT OK
  Running make test
    Can't test without successful make
  Running make install
    Make had returned bad status, install seems impossible
  Failed during this command:
   RJBS/Time-Piece-1.29.tar.gz                  : make NO
  
  cpan[2]&gt;
  </code></pre>
  
  <p>Why is this happening ? Please help me to fix it.</p>
  
  <hr>
  
  <p>I'll wait for an answer while I try to fix it myself. First problem - </p>
  
  <pre><code>'nmake' is not recognized as an internal or external command, operable program or batch file.
  </code></pre>
  
  <p>I used <a href="http://www.eureka.im/68.html" rel="nofollow">this solution</a></p>
  
  <blockquote>
    <p>Windows 7  Control Panel, Programs and Features, Select Microsoft
    Visual Studio 2008 Standard or Professional Edition application then
    choose Uninstall/Change/Modify. This will bring you into Maintenance
    Mode. Select C++ then check X64 Compilers and Tools.</p>
  </blockquote>
  
  <p>I had Visual Studio Express and Visual Studio Professional 2013 (I don't remember how or why it's there on my system.) I followed the above instructions. The options were different: one had C++ mentioned in it - Microsoft Visual C++ 2013 Microsoft Foundation Class Libraries. So, I chose that one. Its a 600MB download and install.</p>
  
  <p>I went to <code>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin</code> and found <code>nmake</code> there. If you don't find it there, then you might find in Microsoft Visual Studio 10, 11 etc. Look for <code>nmake</code> there. Add the path for <code>nmake</code> to the <code>PATH</code> environment variable.</p>
  
  <p>Now, I get a new error</p>
  
  <pre><code>NMAKE : fatal error U1073: don't know how to make 'C:/Program'
  Stop.
    RJBS/Time-Piece-1.29.tar.gz
    nmake -- NOT OK
  Running make test
    Can't test without successful make
  Running make install
    Make had returned bad status, install seems impossible
  Failed during this command:
   RJBS/Time-Piece-1.29.tar.gz                  : make NO
  
  cpan[2]&gt;
  </code></pre>
  
  <p>I'll try to fix this one too. By the way, <code>@ikegami</code> told me that installing to a path with no spaces (<code>C:\progs\...</code>) will solve my problem. I <em>cannot</em> install to another directory:</p>
  
  <blockquote>
    <p>This version of Perl comes bundled with other software which must
    install to the folder <code>"C:\Program Files (x86)"</code> which has a space in it. The
    software needs to be in that path for some other things to work
    correctly. Is there a simple way to edit the code which is trying to install the modules? I could make it parse the path by changing some
    code. I am new to Perl though. Not sure if I'll be able to change
    without causing harm .</p>
  </blockquote>
  
  <p><strong>EDIT -</strong> </p>
  
  <p>I have both Active state perl 5.1.2 and perl 5.8 which are used by tool x and tool y (electric commander). Tool y has its own perl libraries which must be used in my code. So I am stuck with perl 5.8. </p>
  
  <p>I just came to know this is due to issues with tool y. There is a workaround for this, but I am not able to understand it. Can you please help me to understand the workaround for windows ?</p>
  
  <p><a href="https://electriccloud.zendesk.com/hc/en-us/articles/202828073-KBEC-00180-Installing-Perl-modules-into-the-Commander-Perl-distribution" rel="nofollow">https://electriccloud.zendesk.com/hc/en-us/articles/202828073-KBEC-00180-Installing-Perl-modules-into-the-Commander-Perl-distribution</a></p>