[TxMt] Bug report: Perl syntax highlighting [version 1.0.2b10#553]

Xavier Noria fxn at hashref.com
Wed Dec 8 23:39:26 UTC 2004

A few issues in the syntax highlighting done by Perl's bundle.

The first one I think it's typically hard to get right: here-docs are 
not recognised. This not only means that they are not colourised as 
strings, but that their content can fool the rest of the highlighting, 
for instance if there's an unbalanced quote. (Sometimes a fake comment 
can help there though.)

POD sections are not recognised either, so not only they are not 
coloured but Perl keywords are highlighted in regular English (for, if, 
while, ...).

On the other side, hash elements are no correctly highlighted. In

     $foo{bar} = "baz";

the red for variables goes beyond the "{" and stops at the "r":


If "bar" is quoted the highlighting is correct though, curlies in black 
and the string in green.

In the broken example I'd expect the curlies in black, and the key in 
green because it's autoquoted by Perl. Green to the left of =>s would 
be good as well, as words there are also autoquoted. Both conventions 
for autoquoted stuff are followed by CPerl and the Perl mode for Vim.

q(), qq(), and their variants are not highlighted as strings either.

-- fxn

More information about the textmate mailing list