Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

favorite perl mode for Emacs?

by Anonymous Monk
on Oct 24, 2009 at 06:50 UTC ( #803008=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have been using Emacs 22 for awhile now, & its perl-mode gets most syntax correct, but I'm curious; is there a favored third-party perl-mode amongst you Monks?

Us unwashed heathens would like to know...

:)

Replies are listed 'Best First'.
Re: favorite perl mode for Emacs?
by Joost (Canon) on Oct 24, 2009 at 09:54 UTC
    As an alternative to perl-mode, there's also cperl-mode, which most people prefer and is I think also better maintained. There should be a cperl-mode in your emacs installation, but if you want more up-to-date/expermental versions, see the cperl-mode page on emacswiki.

    Also: don't forget to switch on flymake-mode. It's one of the most useful tools in emacs, not just for perl:

    ;; Use cperl-mode for perl (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-m +ode)) (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode)) (add-hook 'cperl-mode-hook (lambda () (require 'flymake) (flymake-mode 1) ;; use flymake (local-set-key (kbd "C-h f") 'cperl-perldoc))) ;; use perldoc inst +ead of info on C-h f

    You might also be interesed in Sepia and other stuff that turns up on CPAN

      Which is more updated cperl-mode?

      One on emacs wiki or one on CPAN?

        The CPAN link (which is the 5.25 version distributed with perl 5.10) is older, at least according to the version number/date than the v6.2 one in the "official" distribution @ Ilya's site

        The other versions mentioned in emacswiki are probably based on/synched with the 6.2 version mentioned above, and may have some updates that ilya's version doesn't have, like more 5.10 syntax support.

        In any case you will get a cperl-mode distributed with both emacs and perl, and if you use fairly recent versions of either you should get at least one usable version of cperl-mode. If you want to get the best mode you can get, you should probably start with ilya's site and then explore the other links on emacswiki to see what version suits you most.

        As for me, I'm mostly writing perl 5.8 compatible code at the moment and Ilya's 6.2 version works fine for that.

Re: favorite perl mode for Emacs?
by FunkyMonk (Chancellor) on Oct 25, 2009 at 00:37 UTC
    There's also jrockway's hack of cperl-mode if you happen to be using either perl 5.10+ or MooseX::Declare.

    As previously mentioned, the emacs wiki is an excellent resource for all things emacs. Investigating its Perl section will be particularly worthwhile.

Re: favorite perl mode for Emacs?
by Bloodnok (Vicar) on Oct 25, 2009 at 02:53 UTC
    To answer the question posed in a misreading of the title and risking the inevitable flames - yeah, don't use it [emacs] at all :-D It used to cause no end of trouble on the Solaris boxes to whose needs I used to administer...

    A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://803008]
Approved by broomduster
Front-paged by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2019-09-15 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (180 votes). Check out past polls.

    Notices?