Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeclared dependencies on DateTime::Duration #37

Open
Grinnz opened this issue Jul 11, 2019 · 4 comments
Open

Undeclared dependencies on DateTime::Duration #37

Grinnz opened this issue Jul 11, 2019 · 4 comments

Comments

@Grinnz
Copy link

Grinnz commented Jul 11, 2019

As reported at Grinnz/Time-Moment-Role-TimeZone#1. DateTime::TimeZone::OlsonDB::Rule loads DateTime::Duration but doesn't use it; DateTime::TimeZone::OlsonDB::Observance loads and uses it, and DateTime::TimeZone and DateTime::TimeZone::OlsonDB use it without loading it. DateTime::Duration is part of the DateTime distribution (thus a dependency on it would be circular and undesirable).

@Grinnz Grinnz changed the title Undeclared dependencies on DateTime::TimeZone Undeclared dependencies on DateTime::Duration Jul 11, 2019
@autarch
Copy link
Member

autarch commented Jul 13, 2019

This is somewhat intentional to avoid a circular dependency, as DateTime depends on DateTime::TimeZone.

This hasn't been a problem until now because no one was using DT-TZ except with DateTime. It's really not designed to be used separately, but if you have a suggestion on how to fix it I'd be open to that.

@autarch
Copy link
Member

autarch commented Jul 13, 2019

One fix that occurs to me is to move everything in this distro to the DateTime distro except the data files. That would "solve" the problem, though then you'd have to require DateTime itself in your role.

@Grinnz
Copy link
Author

Grinnz commented Feb 7, 2020

As it stands, I'll need to have these tests require DateTime::Duration anyway to succeed, so I can't think of a better option.

@Grinnz
Copy link
Author

Grinnz commented Feb 7, 2020

Just beware that since DateTime is installed to archlib and DateTime::TimeZone is installed to the pure perl lib, if you move the DateTime/TimeZone.pm to the archlib dist you won't be able to (easily) move it back, as files in archlib will take precedence even over newer versions in pureperl libs. And you will still need some "main module" in order to declare dependencies on and install the data files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants