Date::Manip version 6.00 was a complete rewrite of the module. For detailed information about the differences, please refer to the Date::Manip::Changes5to6 document. The rewrite was needed in order to handle timezone operations, in addition to many other improvements including much better performance and more robust parsing.
The rewrite made use of features introduced in perl 5.10 which made the date parsing routines significantly cleaner. In addition, the 6.xx release was written as an object oriented set of modules which are much more powerful than the older functional interface. For backward compatibility, a new functional interface was rewritten (which is simply a set of wrapper functions which call the OO methods) which is almost entirely backward compatible with the version 5.xx interface.
The Date::Manip distribution includes all three of these interfaces: the older version 5 interface, and both the new OO interface and the backward compatible functional interface. Also, all three are installed, so you can use whichever interface is appropriate.
Since there are three different interfaces available, choosing the interface is the necessary.
If you are running on a system with a very old version of perl (older than 5.10), the version 5 interface is your only option.
If you are on a system running a newer version of perl, but need to support a script that was written using the functional interface, then you can use the version 6 functional interface.
For everyone else, it is strongly recommended that you use the object-oriented interface.
A more detailed description of each interface is included below. If you already know which interface you want to use, just go to the ``SEE ALSO'' in Date::Manip section for documentation for each interface.
As of December 2012, no development will be done, and I will not correct any remaining bugs in version 5. If a patch is supplied by someone else to fix bugs, I will apply it, provided it applies cleanly, and the resulting code continues to pass all tests. I will not apply patches to add features.
I will continue to distribute version 5 for several years. I do not have a date in mind where version 5 will be removed.
The version 5 interface does not handle daylight saving time changes correctly.
Feel free to email me concerns and comments.
Time zone support is greatly improved, but is still somewhat limited. Since the version 6 interface is backward compatible, dates do not store time zone information in them, so the programmer is responsible for keeping track of what time zone each date is in. If you want full access to the time zone support offered in Date::Manip, you have to use the object-oriented interface.
For the most part, scripts written for older versions of Date::Manip will continue to work (and scripts written for the version 6 functional interface will run with the version 5 interface), however in a few cases, you may need to modify your scripts. Please refer to the Date::Manip::Migration5to6 document for a list of changes which may be necessary.
The OO interface consists of the following modules: Date::Manip::Date, Date::Manip::Delta, Date::Manip::Recur, Date::Manip::TZ, and Date::Manip::Base.
The object-oriented interface is the only way to get the full functionality of Date::Manip. It fully support time zones (and daylight saving time).
If you are running a newer version of perl (5.10 or higher), you can use the object-oriented modules by loading them directly, or you can use a functional interface.
If you use a functional interface, it will default to the version 6 interface, but you can choose to run the version 5 interface in one of three ways:
use Date::Manip::Date; use Date::Manip::Delta; use Date::Manip::Recur; use Date::Manip::TZ; use Date::Manip::Base;
you have access to the OO interface for the appropriate types of objects.
use Date::Manip;
in your script, one of the functional interfaces will be loaded. If you are running a version of perl older than 5.10, it will automatically be the version 5 interface. If you are running a newer version of perl, it will automatically load the version 6 interface.
BEGIN { $Date::Manip::Backend = 'DM5'; } use Date::Manip;
Once a functional interface is loaded, you cannot switch between the version 5 and version 6 interfaces.