Dave Rolsky wrote:
Patches welcome ;)

The time zone stuff is quite bizarre, I admin.  But I really can't think
of a way to handle recurring rules (like ongoing DST rules) without being
able to date math, for example.  How else do you figure out the last
Sunday of October?
No, it's clear that the modules are deeply intertwined. My primary concern is that it is currently impossible to install both on a fresh machine without skipping the tests on one of the two (at least to begin with). In my mind, DateTime is the parent module (and DateTime::TimeZone is the crazy cousin ;) and should be installed first. DT::TZ should be dependent on DT, IMHO, not the other way round.

The DateTime tests do not fully exercise DateTime::TimeZone (nor would you expect them to). So, how about including only those portions of DT::TZ which are required to pass the DT tests. At a quick glance, that would be TimeZone.pm, UTC.pm, Floating.pm, America/Chicago.pm, and America/NewYork.pm. For that matter, since you know exactly what tests are being performed, you can include exactly the portions of the OlsonDB that are used in the DateTime tests and no more.

The TimeZone.pm that would be distributed with DateTime could be suitably booby-trapped (i.e. warn "You must install the full DateTime::TimeZone before using this module"). It would be replaced by the full version after DT::TZ was tested and installed.

I would also suggest that the base DateTime::TimeZone release only needs to contain stub modules for the data files and the Makefile.PL should actually be responsible for generating the multitude of PM's prior to testing. You could even include a preamble to Makefile.PL which would download the latest Olson file (if you want to make the installation dependent on Net::FTP). For those that don't have Net::FTP installed, the Makefile.PL could request that they independently download the Olson files themselves and expand them into a top level OlsonDB directory and rerun 'perl Makefile.PL' to build the TZ files.

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

Reply via email to