Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: check syntax of perl code and pod in emacs

by stefan k (Curate)
on Oct 12, 2004 at 09:48 UTC ( #398432=note: print w/replies, xml ) Need Help??

in reply to check syntax of perl code and pod in emacs

on my system I can M-x cperl-check-syntax which opens a compilation buffer (with broken font-lock) in which I can then jump to the found error(s) directly.

Regards Stefan

Regards... Stefan
you begin bashing the string with a +42 regexp of confusion

Replies are listed 'Best First'.
Re^2: check syntax of perl code and pod in emacs
by water (Deacon) on Oct 17, 2004 at 19:44 UTC
    Sorry for all this lisp stuff, but when I
    M-x cperl-check-syntax
    I get
    Cannot open load file: mode-compile
    Again, apologies for being so emacs clueless.

    Also, why, Stefan, is the method suggested by this thread not preferred? If the code to be checked involved extensive external modules, wouldn't the 'brute force' syntax check of this method better catch and display any problems using those external dependencies?

    Thanks for the insight.


      to your first problem: mode-compile ships with XEmacs (which I use) but doesn't seem to be shipped with Gnu Emacs by default (at least not on my system and the (almost) latest download I have lying around. You can try which seems to be the official download site, but I can't reach it right now. Other than that there are old versions distributed in elisp-archives (search for mode-compile.el in your favorite search machine ;-) Or you may try the XEmacs version that may be on your system, already.

      Once you downloaded it, follow the install instructions in that file. You may skip the byte-compiling which only improves speed, but you have to put the file in one of the directories that the variable load-path holds. Expand you load-path as you like:

      (setq load-path (append (list "~/elisp") load-path))
      As to your second question: Although I appreciate, like and do it myself I'd almost always prefer a well-tested and hopefully maintained piece of code from someone else to one quick written hack by myself. What would you do when the other code doesn't do what you want? Well, you'd done it already: get back to the Monastery and post a question. Whereas one could hope that the emacs and xemacs newsgroups and/or the cperl-mode and mode-compile maintainer might do a better job. But this is just my way of handling things. If the code works for you, go ahead and use it.

      Ah, and just as a sidenote: you might try getting used to writing emacs-lisp-code. It's fun ;-)

      One last: it's stefan k, not Stefan (but I admit that my sig is confusing here)

      Regards... Stefan
      you begin bashing the string with a +42 regexp of confusion

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://398432]
[Discipulus]: in this case Corion we are speaking about software licensing: evry year or two we must rescan the whole ced to produce an excel report, while at every activation / disactivation we update a black box DB: i said that i a week i can produce the perl to..
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)
[LanX]: Choroba: do you miss chaos with ties? apply at the US government.. ;)
[ambrus]: Corion: those are good rules.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2017-03-29 12:12 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (350 votes). Check out past polls.