Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: IDE for Perl programming?

by jcb (Parson)
on Mar 12, 2021 at 04:11 UTC ( [id://11129480]=note: print w/replies, xml ) Need Help??


in reply to Re: IDE for Perl programming?
in thread IDE for Perl programming?

Seconding this recommendation for Emacs CPerl mode. The integration with "speedbar" makes navigating even complex hierarchies easy, with CPerl supplying tags for Perl files in the speedbar window. Emacs even has a Windows port, last I checked, so you can use it on almost any system.

Replies are listed 'Best First'.
Re^3: IDE for Perl programming? ( *cperl-mode* )
by LanX (Saint) on Mar 12, 2021 at 13:18 UTC
    Yes cperl's syntax parsing is great, I use it for auto-indentation and formatting, which happens far faster than shelling out to perltidy.

    Though (tangential!) it's giving me a hardtime ATM, because I have y_max somewhere in my code/comments/pod and it thinks it's an unfinished tr with _ as delimiter.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    update

    Added (cperl-mode) to title and considered to reparent this sub-thread into an own one

    EDIT: please own thread possible, quite a drift ?

      > I have y_max somewhere in my code/comments/pod and it thinks it's an unfinished tr with _ as delimiter.

      Confirmed, even this is wrong:

      sub y_max { 1 }

      Send a patch or report to the maintainers.

      Update: Done.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        I think you meant mailing to bug-gnu-emacs@gnu.org ?

        I doubt the general emacs staff can handle this, this should be done by the cperl maintainers, which leads to an interesting question....

        Which and who's cperl-version is bundled with emacs?

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

      This particular bug should be already fixed in the Emacs repository, available as cperl-mode.el. However, it is only backported to Emacs versions 26.1 and above.
        Are you sure? I'm on emacs 27.1 with cperl-mode symlinked from the latest git version, but still see
        sub y_max { 1 }
        highlighted as a transliteration.

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        There's also the opposite case where you must not use whitespace:
        # This works and means the string 'foo': q#foo# # This is a single q, #foo# is a comment. q #foo#
        Funny, eh?

        Yes, it is a bug in the parser. In that monstrosity which analyses POD, Here-docs, regexes, and quote-like constructs, because in all of these things characters may change their meaning. choroba filed Bug#47112, a quick patch is coming soon.

        By the way: You can, in fact, eliminate that bug without any patch by setting the customizable variable cperl-under-as-char to t.

        Sigh. This dates back to a change Richard M. Stallman himself committed in 1998. Let's see whether I manage to revert that.

Re^3: IDE for Perl programming?
by LanX (Saint) on Mar 12, 2021 at 18:59 UTC
    > The integration with "speedbar"

    I think you mean Cperl's support for Imenu which helps me - among other stuff - to jump-to-definition of subs under the cursor.

    I'm not using Speedbar but ECB on top and both can use Imenu as backend to list all subs in an extra panel instead of a drop-down menu-list.

    edit

    at the time I was experimenting with Speedbar it insisted in opening an extra "docked" window instead of splitting the current one, which was really kind of annoying. I know it's better nowadays.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Yes, the support is for imenu. I highlighted speedbar because it has been mentioned in this thread.

      The vanilla M-x speedbar still opens an extra window ("frame" in Emacs lingo), but MELPA offers sr-speedbar which uses the same frame. I haven't tried it myself, though.

        > Yes, the support is for imenu.

        I just looked into the docs for imenu and realized that emacs has a which-function-mode to dynamically update the name of the current function in the mode bar when navigating...

        Needed this, reading helped.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found