On Mon, 28 Feb 2005, Geoffrey Young wrote:
The hugeness is the DateTime::TimeZone object, not DateTime itself. Those are all singletons, so you only pay the price once per time zone.
ok, but how does that affect storable-style serializations? I noticed that you have some storable hooks, but I didn't see exactly how it worked.
Unfortunately, it's not possible to retain singleton-ness after a freeze/thaw with Storable. This is because of the way Storable's internals work. I _think_ this could be changed, and I tried doing so, but couldn't quite figure it out. I brought it up on P5P a while back (maybe a year) but nobody responded.
I'm open to a patch, but it's a lot of work, and not something I'd have time to do any time soon.
I can take a crack at it, but it wasn't clear exactly how these things interlaced, or even what the span foo was. if you could sorta point me in the right direction for implementing it in a way you'd prefer I'll have a go at it.
Start by taking a look at tools/parse_olson and DateTime::TimeZone::OlsonDB. The latter isn't all that well documented (to say the least), unfortunately.
I think to make this work we'd have to break up the rules for a given zone and store them in the file, then parse them on the fly as needed.
-dave
/*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/