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

Straighten up how exceptions are detected in the 'wanted' callback #1

Closed
wants to merge 1 commit into from

Conversation

vpit
Copy link

@vpit vpit commented Jul 22, 2017

Hello,

The detection of the directories that must be skipped when collecting perl files was pretty lax. In particular, it abused regexps of the form m![^\\/]?inc!, probably with the goal of allowing both "inc" and "/inc". Unfortunately, m![^\\/]?inc! can match a lot of other things, such as "vincent", which happens to appear in my TEMP environment variable, and which ultimately made the test suite fail.

I've rewritten this whole section to use File::Spec->splitdir to split the directory name in chunks, and then decide on whether the directory should be skipped depending on their value. The result should be more deterministic.

The m!Build$! regexp that appears next line should probably be anchored as well, but I'll leave that to your appreciation.

I'd advise you to roll an alpha release out first before making it official, since this change touches a core path of the module.

Vincent

@karenetheridge
Copy link
Owner

thank you! I started with your patch and expanded on it, and added a test. This will be in release 2.001. sorry it took so long!

karenetheridge added a commit that referenced this pull request Dec 6, 2020
  - better matching on files, directories to be ignored (e.g. no longer
    confuses directory "vincent" for "inc") - closes RT#133862, PR #1
  - handle long @inc lines by passing through $PERL5LIB (Father Chrysostomos,
    RT#123448)
@vpit vpit deleted the fix_files_misdetection branch March 2, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants