rpike has asked for the wisdom of the Perl Monks concerning the following question:

I'm still trying to install Date::Calc using cpan this time. I'm trying to do this on an existing server that has the following on it : C:/Perl which seems to hold version 5.0 of Perl C:/Perl-5.8 which is holding version 5.8 of Activestate's Perl installation I try going into cpan from the DOS prompt and when I try running install Date::Calc I get the following message(s) :
Going to read C:\Perl\cpan\Metadata Database was generated on Mon, 10 Nov 2008 10:27:00 GMT Running install for module 'Date::Calc' Running make for S/ST/STBEY/Date-Calc-5.4.tar.gz Checksum for C:\Perl\cpan\sources\authors\id\S\ST\STBEY\Date-Calc-5.4. +tar.gz o Scanning cache C:\Perl/cpan/build for sizes ...................................................................... +......DO Date-Calc-5.4/ Date-Calc-5.4/t/ Date-Calc-5.4/t/f023.t Date-Calc-5.4/t/f006.t Date-Calc-5.4/t/f025.t Date-Calc-5.4/t/f008.t Date-Calc-5.4/t/m011.t Date-Calc-5.4/t/f027.t Date-Calc-5.4/t/f029.t Date-Calc-5.4/t/f011.t Date-Calc-5.4/t/f030.t Date-Calc-5.4/t/f013.t Date-Calc-5.4/t/f032.t Date-Calc-5.4/t/f015.t Date-Calc-5.4/t/f034.t Date-Calc-5.4/t/m001.t Date-Calc-5.4/t/f017.t Date-Calc-5.4/t/f036.t Date-Calc-5.4/t/m003.t Date-Calc-5.4/t/f019.t Date-Calc-5.4/t/m005.t Date-Calc-5.4/t/m007.t Date-Calc-5.4/t/m009.t Date-Calc-5.4/t/f001.t Date-Calc-5.4/t/f020.t Date-Calc-5.4/t/f003.t Date-Calc-5.4/t/f022.t Date-Calc-5.4/t/f005.t Date-Calc-5.4/t/f024.t Date-Calc-5.4/t/f007.t Date-Calc-5.4/t/m010.t Date-Calc-5.4/t/f026.t Date-Calc-5.4/t/f009.t Date-Calc-5.4/t/f028.t Date-Calc-5.4/t/f010.t Date-Calc-5.4/t/f012.t Date-Calc-5.4/t/f031.t Date-Calc-5.4/t/f014.t Date-Calc-5.4/t/f033.t Date-Calc-5.4/t/f016.t Date-Calc-5.4/t/f035.t Date-Calc-5.4/t/m002.t Date-Calc-5.4/t/f018.t Date-Calc-5.4/t/m004.t Date-Calc-5.4/t/m006.t Date-Calc-5.4/t/m008.t Date-Calc-5.4/t/f000.t Date-Calc-5.4/t/f002.t Date-Calc-5.4/t/f021.t Date-Calc-5.4/t/f004.t Date-Calc-5.4/examples/ Date-Calc-5.4/examples/linearcal.pl Date-Calc-5.4/examples/time.pl Date-Calc-5.4/examples/nth_weekday.pl Date-Calc-5.4/examples/vacation.pl Date-Calc-5.4/examples/anniversaries.pl Date-Calc-5.4/examples/income.pl Date-Calc-5.4/examples/age_in_days_eu.pl Date-Calc-5.4/examples/cal.c Date-Calc-5.4/examples/holidays.pl Date-Calc-5.4/examples/bug.pl Date-Calc-5.4/examples/delta.pl Date-Calc-5.4/examples/calendar.cgi Date-Calc-5.4/examples/weiberfastnacht.pl Date-Calc-5.4/examples/age_in_days_us.pl Date-Calc-5.4/Calc.xs Date-Calc-5.4/tools/ Date-Calc-5.4/tools/compile.pl Date-Calc-5.4/tools/iso2pc.c Date-Calc-5.4/tools/pc2iso.c Date-Calc-5.4/tools/compile.bat Date-Calc-5.4/tools/compile.sh Date-Calc-5.4/MANIFEST Date-Calc-5.4/CREDITS.txt Date-Calc-5.4/ToolBox.h Date-Calc-5.4/DateCalc.c Date-Calc-5.4/Calendar.pm Date-Calc-5.4/INSTALL.txt Date-Calc-5.4/CHANGES.txt Date-Calc-5.4/DateCalc.h Date-Calc-5.4/Makefile.PL Date-Calc-5.4/lib/ Date-Calc-5.4/lib/Date/ Date-Calc-5.4/lib/Date/Calendar/ Date-Calc-5.4/lib/Date/Calendar/Profiles.pm Date-Calc-5.4/lib/Date/Calendar/Profiles.pod Date-Calc-5.4/lib/Date/Calendar/Year.pm Date-Calc-5.4/lib/Date/Calendar/Year.pod Date-Calc-5.4/lib/Date/Calc/ Date-Calc-5.4/lib/Date/Calc/Object.pm Date-Calc-5.4/lib/Date/Calc/Object.pod Date-Calc-5.4/Artistic.txt Date-Calc-5.4/README.txt Date-Calc-5.4/TOOLS.txt Date-Calc-5.4/GNU_LGPL.txt Date-Calc-5.4/EXAMPLES.txt Date-Calc-5.4/GNU_GPL.txt Date-Calc-5.4/typemap Date-Calc-5.4/Calc.pod Date-Calc-5.4/Calendar.pod Date-Calc-5.4/Calc.pm CPAN.pm: Going to build S/ST/STBEY/Date-Calc-5.4.tar.gz Checking if your kit is complete... Looks good Have C:\Perl-5.8\lib\Config.pm expected C:\Perl\lib\Config.pm Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [lib] Config says: [MSWin32-x86-multi-thread] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Writing Makefile for Date::Calc Writing patchlevel.h for P:\Perl-5.8\bin\perl.exe (5.008008) 'nmake' is not recognized as an internal or external command, operable program or batch file. STBEY/Date-Calc-5.4.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: STBEY/Date-Calc-5.4.tar.gz : make NO
I would REALLY appreciate help on this since I need some way to add to or subtract to and from dates.

Replies are listed 'Best First'.
Re: Using cpan
by Corion (Patriarch) on Nov 11, 2008 at 21:35 UTC

    The key line in your output is the following:

    'nmake' is not recognized as an internal or external command, operable program or batch file.

    This means that the install process couldn't find nmake.exe. You can download nmake.exe v1.5, it will work but it is a fairly old one. You will have to extract it somewhere in the path, I recommend the same directory that perl.exe (the 5.8.8 version) lives in.

    I see now that Date::Calc also will require a C compiler for installation/compilation. If you don't have one already (and your lack of nmake.exe hints at that), you will have to install MSVC 6 (to match ActiveState Perl) or go on the hunt for how to configure ActiveState Perl to use the MinGW gcc.exe. Alternatively, you can switch over to Strawberry Perl, which comes in a 5.8.8 version and includes a fitting and configured make tool (called dmake.exe) and the appropriate C compiler.

      Once you have installed MinGW ASPerl will use it without any further configuration. Just make sure your PATH points to gcc.exe and nmake.exe.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Using cpan
by jeffa (Bishop) on Nov 11, 2008 at 21:06 UTC

    I prefer Time::Piece over Date::Manip. There is also the DateTime suite (not Date::Time) ... both of these will allow you to add and subtract dates fairly easily. If you still can't get Date::Manip to install, then perhaps you can try one of these alternatives until you or someone else figures out why the install didn't work.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Using cpan
by ig (Vicar) on Nov 11, 2008 at 22:24 UTC

    I use Date::Manip when I need time or date processing beyond what the core modules provide. Not because I know it's best, just because I am familiar with it and it works well enough that I haven't bothered to look at any of the many alternatives.

    One advantage of Date::Manip over Date::Calc in your situation is that it is pure Perl so you don't need a compiler.

    I will often copy the one .pm file into the perl library folder manually, avoiding the need to install nmake. This is bad because the tests aren't run, but I have never had any problem and it has always passed the tests when I have run them. YMMV.

Re: Using cpan
by rpike (Scribe) on Nov 11, 2008 at 21:28 UTC
    Where is Time::Piece then? I'm using Activestate's Komodo and after typing in Time:: it doesn't come up with Piece as one of the options?
Re: Using cpan
by marcussen (Pilgrim) on Nov 12, 2008 at 05:29 UTC

    I thought you were supposed to use ppm with ASperl

    Confucius says kill mosquito unless cannon
Re: Using cpan
by rpike (Scribe) on Nov 12, 2008 at 14:22 UTC
    Would you happen to have a simple example of taking a date, subtracting a certain number of days, and returning the day, month, and year? Thanks so much for the help guys.
Re: Using cpan
by rpike (Scribe) on Nov 12, 2008 at 14:23 UTC
    ...example using Date::Manip that is.