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

delay loading PICA modules in PICA::Schema to work around circular dependencies #137

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

haarg
Copy link
Contributor

@haarg haarg commented Aug 27, 2023

The various modules in this dist have circular dependencies between them. This would result in PICA::Patch failing to import subs from PICA::Schema, because the sub and exporting was not set up yet by the time it would try to import. Perl would ignore the call to import when the method didn't exist.

Delay loading the other PICA modules until after all parsing has been completed and exporting is set up.

Future versions of perl are intending to throw errors when passing arguments to an undefined import method, which causes test failures. This also helped reveal the broken import.

…pendencies

The various modules in this dist have circular dependencies between
them. This would result in PICA::Patch failing to import subs from
PICA::Schema, because the sub and exporting was not set up yet by the
time it would try to import. Perl would ignore the call to import when
the method didn't exist.

Delay loading the other PICA modules until after all parsing has been
completed and exporting is set up.

Future versions of perl are intending to throw errors when passing
arguments to an undefined import method, which causes test failures.
This also helped reveal the broken import.
@nichtich nichtich merged commit 5e67dd4 into gbv:main Aug 28, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants