fix used_plugins to only return real traits using proper format#142
Open
haarg wants to merge 1 commit intojjn1056:masterfrom
Open
fix used_plugins to only return real traits using proper format#142haarg wants to merge 1 commit intojjn1056:masterfrom
haarg wants to merge 1 commit intojjn1056:masterfrom
Conversation
Rather than filtering the traits list to ones not generated by MooX::Traits::Util, filter for %INC entries that came from their own files by checking that the file matches the trait name. Also ensure traits in subdirectories are returned with double colon separators, rather than slashes.
Collaborator
|
In context, this function is basing things on plugins because it's part of
a DSL for migrations, where the object managing the migration gets mixed in
with the traits that are loaded.
Know that I'm seeing how flaky this is, it's probably worth looking into
some better way to provide the same interface.
…On Mon, Mar 29, 2021, 09:44 Graham Knop ***@***.***> wrote:
Rather than filtering the traits list to ones not generated by
MooX::Traits::Util, filter for %INC entries that came from their own
files by checking that the file matches the trait name. Also ensure
traits in subdirectories are returned with double colon separators,
rather than slashes.
This addresses RT#134845
<https://rt.cpan.org/Ticket/Display.html?id=134845>
This entire function seems very suspect. I didn't fully investigate how it
is used, but it really seems like it shouldn't exist. Basing anything on
which plugins happen to have been loaded seems like a big mistake.
------------------------------
You can view, comment on, or merge this pull request online at:
#142
Commit Summary
- fix used_plugins to only return real traits using proper format
File Changes
- *M* lib/DBIx/Class/Migration/RunScript.pm
<https://github.com/jjn1056/DBIx-Class-Migration/pull/142/files#diff-8b7fc96d23b4020a9b064722a367754e35a6e051ffcae1531735ac89f85a8a9d>
(31)
Patch Links:
- https://github.com/jjn1056/DBIx-Class-Migration/pull/142.patch
- https://github.com/jjn1056/DBIx-Class-Migration/pull/142.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#142>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFURPKRYXYKV6ETTIQN3DSTTGAVVFANCNFSM4Z67AQNA>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than filtering the traits list to ones not generated by
MooX::Traits::Util, filter for %INC entries that came from their own
files by checking that the file matches the trait name. Also ensure
traits in subdirectories are returned with double colon separators,
rather than slashes.
This addresses RT#134845
This entire function seems very suspect. I didn't fully investigate how it is used, but it really seems like it shouldn't exist. Basing anything on which plugins happen to have been loaded seems like a big mistake.