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.
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](www.scintilla.org). You may wish to post a feature request there since you can then discuss it with the Perl lexer maintainer directly.
Yes, the symbol -- resolved or not -- goes through `$M::anything`.
Filed over there: https://sourceforge.net/p/scintilla/bugs/1980/
I created a merge request in Scintilla to fix this, see https://sourceforge.net/p/scintilla/code/merge-requests/23.
github-comments@lists.geany.org