Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Wanted: module for syntax highlighting

by jplindstrom (Monsignor)
on Feb 25, 2003 at 01:26 UTC ( #238313=perlquestion: print w/replies, xml ) Need Help??

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

I can't find a module for syntax highlighting.

I'm gonna pretty print SQL code on web pages.

Any modules like that? Any favourites?


Replies are listed 'Best First'.
Re: Wanted: module for syntax highlighting
by tachyon (Chancellor) on Feb 25, 2003 at 01:59 UTC

    perltidy will do HTML syntax highlighting for Perl. For SQL you could just use SQL::Parser or maybe SQL::Statement to do the parsing and add color as you see fit. Personally I think:

    SELECT id FROM address_book WHERE username = ? OR private_address IS NULL

    is pretty enough already.



Re: Wanted: module for syntax highlighting
by zengargoyle (Deacon) on Feb 25, 2003 at 02:34 UTC

    if by 'pretty print' you mean 'colorize', while not Perl Vim does good by me for the coloring part. i even think i remember seeing a macro or example in the distribution for colorizing from the shell.

    but if you want to start writing a module here's what Vim uses as it's guideline, it shouldn't be to hard to check for the special words and wrap them with some color.

Re: Wanted: module for syntax highlighting
by zentara (Archbishop) on Feb 25, 2003 at 14:26 UTC
      What operating system did you want a program for? For windows there is a program in VB which keeps track off all the variables and highlights them along with loop and if statements. To find it just type perl in search in the Visual basic part at

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://238313]
Approved by FoxtrotUniform
Front-paged by broquaint
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 2021-10-28 12:31 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (96 votes). Check out past polls.