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

Avoid using multiple with in Data:: files #2751

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

reosarevok
Copy link
Member

https://metacpan.org/pod/Perl::Critic::Policy::Moose::ProhibitMultipleWiths

Since this involves a lot of files, doing it in parts to ensure it's easier to find what broke if something does - this just for Data::

On top of #2704

Several files were applying Role::Area twice, and there was a clash when Role::SelectAll was being applied to files already applying Role::OptionsTree (which itself applies Role::SelectAll).

Role::OptionsTree already applies Role::SelectAll,
so trying to apply it again causes Moose issues
(these are currently hidden because we incorrectly use multiple with).

Since we want to be able to pass an order_by parameter to SelectAll,
I made OptionsTree parameterizable and made it pass the parameter
through.
@reosarevok reosarevok marked this pull request as ready for review December 4, 2023 17:05
https://metacpan.org/pod/Perl::Critic::Policy::Moose::ProhibitMultipleWiths

Since this involves a lot of files, doing it in parts to ensure
it's easier to find what broke if something does - this just for Data::
@reosarevok reosarevok merged commit 3cb7bbe into metabrainz:master Dec 6, 2023
2 of 3 checks passed
@reosarevok reosarevok deleted the no-multiple-with-data branch December 6, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Refactoring-only PRs (eslint fixes etc)
Projects
None yet
2 participants