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

IRI.pm: Must specify lower bound on regex quantifiers #8

Merged
merged 1 commit into from
Jun 20, 2016

Conversation

khwilliamson
Copy link
Contributor

There are 5 occurrences of /{,\d}/ in this module. I suspect these were
meant to mean {0,\d}, that is a quantifier matching 0 times up to the
specified limit. But instead Perl thinks they are trying to match a
left brace followed by a comma, followed by the digits, followed by a
right brace. Perl 5.25 now warns about this usage, and so this was
found.

It could be that I'm wrong and the code is meant to match that sequence, but it seems unlikely. And if I'm right, it indicates that there are tests missing that would have found this. (The same construct is used as well in Attean.)

There are 5 occurrences of /{,\d}/ in this module.  I suspect these were
meant to mean {0,\d}, that is a quantifier matching 0 times up to the
specified limit.  But instead Perl thinks they are trying to match a
left brace followed by a comma, followed by the digits, followed by a
right brace.  Perl 5.25 now warns about this usage, and so this was
found.
@kasei kasei merged commit 0a3ed28 into kasei:master Jun 20, 2016
@kasei
Copy link
Owner

kasei commented Jun 20, 2016

Looks good. Thanks for catching this!

@kasei
Copy link
Owner

kasei commented Jun 20, 2016

Can you point me to where you saw it in Attean? I didn't find anything with a quick grep.

@khwilliamson
Copy link
Contributor Author

On 06/20/2016 05:37 PM, Gregory Todd Williams wrote:

Can you point me to where you saw it in Attean? I didn't find anything
with a quick grep.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#8 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AAGhny2pcO0P23fGp2sgp7wAsChaQ_jNks5qNyRCgaJpZM4I6LsR.

Thanks for your prompt attention. I investigated, and it appears the
errors are actually coming from IRI.

http://www.cpantesters.org/cpan/report/ee393738-362c-11e6-83b5-bcf7378fbd9d

BTW, this thread on p5p is how I found out about this:
87vb13u2le.fsf@k85.linux.bogus

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