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

Perl syntax highlight does not understand $package::var syntax #1679

Open
jernst opened this issue Nov 7, 2017 · 3 comments
Open

Perl syntax highlight does not understand $package::var syntax #1679

jernst opened this issue Nov 7, 2017 · 3 comments

Comments

@jernst
Copy link

jernst commented Nov 7, 2017

In Perl, I define a module M.pm with a shared variable $foo:

package M;
our $foo = 'something';
1;

which I then can use, with a full path, in some other file f.pl:

use M;
print "The value is $M::foo\n";
1;

In the print line, Geany syntax-highlights $M but it is supposed to highlight $M::foo as that is the name of the symbol.

@elextr
Copy link
Member

elextr commented Nov 8, 2017

Confirmed, note that the $M is highlighted because it is syntax not because the name is known, you can remove the use M and it still highlights.

I don't know Perl much, and its possible that $M::anything is the appropriate syntax to highlight, but it won't depend on the package contents. The syntax highlighting is supplied by the Scintilla lexer Geany uses, which is a separate project here. You may wish to post a feature request there since you can then discuss it with the Perl lexer maintainer directly.

@jernst
Copy link
Author

jernst commented Nov 8, 2017

Yes, the symbol -- resolved or not -- goes through $M::anything.

Filed over there: https://sourceforge.net/p/scintilla/bugs/1980/

@lpaulsen93
Copy link
Contributor

I created a merge request in Scintilla to fix this, see https://sourceforge.net/p/scintilla/code/merge-requests/23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants