1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Before you install Date::Manip, check out the variables at the top of
Manip.pm. You may want to modify some of the configuration variables.
All variables are documented in the POD documentation included in the
Manip.pm file.
The $Date::Manip::TZ variable is perhaps the most important of these
variables. If you get the error:
ERROR: Date::Manip unable to determine TimeZone.
Date::Manip was unable to automatically determine your timezone. In
this case, you will need to set the TZ variable appropriately.
AUTOMATIC INSTALLATION
To install, just type
perl Makefile.PL
make
make test
make install
MANUAL INSTALLATION
Some people have reported problems with the automatic installation above.
If the above fails, installing manually is very simple. Just do the
following:
Take a look at the value of @INC in a perl script (run the debugger and
print @INC). In any of the directories that it lists, create a directory
named Date. Copy Date/Manip.pm to this directory.
In our installation, I have installed DateManip as:
/usr/local/lib/perl5/site_perl/Date/Manip.pm
Make sure that in your perl script you have the line:
use Date::Manip;
You can also create the man page using the command:
pod2man Manip.pod > Date::Manip.3
and install it somewhere in your MANPATH. I have it in:
/usr/local/man/man3/Date::Manip.3
To test it, cd to the "t" directory and run the "runtests" command.
TESTS
A few of the tests may fail. Some will fail if they are run on a very slow
computer (it will compare two different times that were supposed to be the
same but aren't because a measurable amount of time passed between
determining the time in two different ways).
Some of the tests may fail if they are run on either the first or last day
of the month. The test suite checks dates of the form "tomorrow".
Unfortunately, there is no trivial way (that I could think of) to find
tomorrows date using standard perl or Unix commands (which is one of the
reasons you need this module). So to get the value to compare
Date::Manip's value with, I just add 1 to todays date (which returns Jan 32
instead of Feb 1, for example). So, the "tomorrow" tests fail on the last
day of the month and the "yesterday" tests fail on the first day of the
month.
|