-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Plain perl mistaken for Perl6 #2074
Comments
Thanks for reporting the issue!
Cool, I added that in #2092
The shebang strategy, which runs before the heuristics, should properly detect the perl version. |
This was fixed in #2092 |
dbsrgits-sync
pushed a commit
to Perl5/DBIx-Class
that referenced
this issue
Apr 28, 2016
Port of mojolicious/mojo@19cdf772 Before this clarification the project listed as 7% Perl6 code >.< The explicit listing is needed, as there apparently won't be a fix within Github itself any time soon: github-linguist/linguist#2149 (comment) github-linguist/linguist#2781 (comment) github-linguist/linguist#2074 (comment) Language names sourced from: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
gamogamze15
pushed a commit
to gamogamze15/linguist
that referenced
this issue
Mar 18, 2024
…ate_gitignore Redesign gitignore
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was forwarded here by github relating to a failure to highlight this document: https://gist.github.com/kentfredric/04b64a80c5d90eea2924
Repeated attempt to indicate what language it was using the file extension always resulted in it thinking I was using Perl6.
Looking into your heuristics ( as per #2042 ) I find this: https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb#L54-L57
That perl heuristic is incredibly narrow and will exclude anything that is relying on strict to be injected by another pragma/module.
use Moose
anduse Moo
both inject strict.use 5.xxx
injects strict where "xxx" can be converted to an integer that is 12 or greater.Though it seems to me, a good heuristic to use in addition to
use strict
would be :Which should catch any perl5 document that is using an explicit perl version requirement.
As would:
( Because "perl" may never assume to mean "perl6", and may only imply perl5 )
The text was updated successfully, but these errors were encountered: