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

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
Node Status?
node history
Node Type: perlquestion [id://238313]
Approved by FoxtrotUniform
Front-paged by broquaint
[erix]: antisemitic && (pro-)russian. Makes sense :P
[shmem]: erix: what's antisemitic in there? Tell me.
[erix]: AngloZionist
[shmem]: and it is *not* pro-russian. It describes the western world.
[erix]: I'm not going to read it so I could be mistaken but it reeks of useful idiocy
[shmem]: AngloZionist is not an antisemitic term.
[shmem]: erix: be assured that we all are horribly mistaken, always. What would we write tests for, if not for that fact?
[shmem]: and then, audiatur et altera pars.
[erix]: and what's the "Vineyard"? Don't tell me it's doing supernatural stuff too.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-03-19 20:57 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.