Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I've been using Emacs for a while now, and I currently use perl-mode for all my perl syntax highlighting needs. I've been looking for a way to change the default indentation of perl-mode, and nearly all the documentation I could find online said very little about perl-mode, and just said (I'm paraphrasing) "perl-mode screws up perl highlighting, cperl-mode is MUCH better, everyone sensible uses cperl-mode"

So I think to myself 'well, you're a sensible person on occaision, why not give this "cperl-mode" another go?' I've looked at it briefly before but it was so alien (not to mention ugly) that I discarded it there and then. One of the major reasons I discarded it before was that I don't seem to have any problems with perl-mode. This almost certainly reflects my non-advanced perl code. But it does make me wonder:

  • What is so great about c-perl mode?
  • What is so backwards and stupid about perl-mode? What does it struggle with?
  • Why doesn't cperl-mode highlight variables in for loops, subroutine calls (with the &sub(arg) syntax), and why are 'my' and 'our' the same colour as if, for, while etc.?
  • I like (or rather I am used to) perl-mode highlighting and I think cperl-mode is ugly!

I know this last point is shallow, but I find the array and hash highlighting distracting, and the variable highlighting within comments annoying. I've managed to change some of these things in the customisation buffer, but by no means all of them. I don't mind fiddling around to make things prettier, but I want to know it's going to be worth it!

This wasn't meant to be quite so much of a rant..! If cperl-mode is so good, I want to be able to like it, and use it without it frustrating me.. so if anyone has any answers to these questions or any resources I can use to help me fiddle with it (I am VERY lisp ignorant but willing to learn, though don't seem to have any luck with getting hold of a working interpreter) then I'd be grateful. So here is chance for any cperl-mode fanatics out there to convert me :)
Those are my principles. If you don't like them I have others.
-- Groucho Marx

In reply to c-perl mode on Emacs by why_bird

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2023-06-07 08:33 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.