Menu

#457 $" and other Perl built-ins broken

minor bug
closed-duplicate
nobody
5
2001-05-09
2001-05-08
Anonymous
No

While not often used, the $" (and similar built-in
symbolic variables) cause highlighting to go haywire.
I have never seen an editor that properly highlights
Perl, so I'm not at all being critical--though, vim
comes as close as I've every seen.

Perl itself can't even be parsed by any standard
parser generator--at least, the last I knew it was a
cross between yacc, bison, and some very deeply
customized C code. However, I thought you guys might
do some thinking on how one might perform some better
syntax highlighting for some of the complicated issues
in Perl.

Some of it could be solved by introducing regular
expressions within the mode files--this would be used
very selectively to prevent slowing of the editor due
to abuse. Anyway, here are some of the interesting
situations that we get into when it comes to Perl that
might shed some light on the issue.

$" = ', ';
print "\@somearray = @somearray\n";

or:

if($x =~ m|nonstandard regexp quotes|) {
print <<NOT_EOF;
This text isn't getting highlighted because I
didn't use the magic word EOF...
NOT_EOF
}

Anyway, this is just something to think about, not
something I expect implemented.

Thanks,
Sterling

Discussion

  • Slava Pestov

    Slava Pestov - 2001-05-09
    • summary: $" and other Perl built-ins broken --> $" and other Perl built-ins broken
    • status: open --> closed-duplicate
     
  • Slava Pestov

    Slava Pestov - 2001-05-09

    Logged In: YES
    user_id=2280

    Duplicate of 422456

     

Log in to post a comment.