Curious dependencies in DateTime

hex on 2004-01-13T11:11:16

richardc - our release manager here at Fotango - just came over to tell me that our build system was choking whilst running the tests for Locale::Object. After a bit of poking around, we traced the problem down to DateTime::TimeZone, which L::O uses.

It turns out that the build was croaking because when Locale::Object::Country did a DateTime::TimeZone->new(), it needed DateTime. However, my Build.PL doesn't list DT as a pre-req, because DT::TZ doesn't either. Combing through the code, we discovered that DT::TZ has an implicit requirement for DateTime because DateTime::TimeZone::OlsonDB does a DateTime->new(). Not a problem, you'd think, right? Add a dependency for DT. Unfortunately, DT depends on DT::TZ.

Our "solution" was to skip tests for DT::TZ. Not ideal. Anybody have any experience of dealing with this kind of thing?


Interesting

autarch on 2004-01-13T17:31:33

I guess I never anticipated someone installing DateTime::TimeZone without installing DateTime. Normally, I figured that people would install the latter, which reqiures the former.

If someone comes up with a good solution I'd be happy to use it.