Menu

#2705 Perl Mode - sub foo($) { broken

closed-fixed
nobody
5
2006-11-02
2006-10-31
No

When a subroutine is declared, various symbols may
appear in the argument brackets to define the prototype
of the subroutine.

The symbols are:
$ : Scalar
@ : List
% : Hash
& : Anonymous subroutine
* : Typeglob

The current perl.xml highlighting breaks when $ is
included in the prototype. All of the other symbols are
handled correctly.

For example,

sub foo() {} is fine.
sub foo(%) {} is fine.
sub foo($) {} is broken as it interpreting $) as a
variable.
sub foo($$) {} appears fine, but is broken as the $$ is
highlighted as a variable, inconsistent with the other
symbols.

Otherwise, the current mode (#7773) is the best perl
mode we've had for ages - particularly since vanza
fixed 1585327!

Discussion

  • Marcelo Vanzin

    Marcelo Vanzin - 2006-11-02

    Logged In: YES
    user_id=75113

    Fixed in revision #7883. Let me know if the color selection
    is OK. :-)

     
  • Marcelo Vanzin

    Marcelo Vanzin - 2006-11-02
    • status: open --> closed-fixed
     
  • Nicholas O'Leary

    Logged In: YES
    user_id=631957

    Looks great.

    Yet again, thanks for your work on this vanza - ironically,
    after today I change jobs so I no longer have to support the
    perl code that has been the source of so many bug reports on
    jedit's perl mode ;)

    But I'm sure there are many others out there who will
    appreciate it!

    N

     

Log in to post a comment.