http://qs321.pair.com?node_id=66216

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

I've finally finished my syntax highlighting module. Now I'd like to get the community's review of what I've written.

I'm going to post links to the code here, instead of the code itself, for 3 reasons:

  1. It's rather large. Weighing in at just over 2600 lines (including POD), it's the biggest project I've yet completed.
  2. It's wide. I edit code in 120x48 window but most monk's <CODE> tags wrap at around 70 characters. Trust me, it looks horrible wrapped to 70 characters. :-)
  3. I wrote this nifty web page, using the module, that lets you view it (along with the script that generates the web page, of course). Plus it lets you enter in your own code to try out with the module, as well as define custom formatting (colors) and such, so it's fully self-demonstrating. Anyway, I'm proud of it.

I'd like to get people's thoughts on the code itself (please remember, though, that this is the first version; I haven't even optimized it!), my style, the concept, the documentation, as well as just general impressions. Suggestions for improvement and other comments will be appreciated.

I realize that it is kind of a lot of code, and that people are busy. Even if you only read the documentation, I would still like to hear your comments. Even general impressions after only skimming the code are OK.

I promise I won't get offended or upset by any comments. I'm open to criticism (though I prefer it to be constructive). If there's something you'd like to say privately to me, feel free to /msg me, or you can email me at join('@', 'darkness', 'yossman.net').

If the general impression is that I did a decent job of it, I plan to include it in my "portfolio" of code. If people think that it would be useful, I also plan on posting it to CPAN, possibly along with the couple of programs I wrote to use the module.

Okay, enough talk. The code is located at http://exnoctum.port5.com/cgi-bin/perl-highlighter.pl. I have had a few of my friends tell me that they have trouble accessing the site. I think that the server occasionally doesn't respond but should work if you just try it again. (It is a free account, and I guess you get what you pay for. Though it's nice that there are free sites that give Perl access.) If you consistently can't access the page, let me know and I will look into trying to set up a mirror.

Note to the editors: I had trouble deciding where to post this. I ended up choosing SOPW because it seemed most appropriate (to my mind, anyway). The editors are free to move it if I chose badly. Mea culpa.

Okay... Let the learning begin (er, continue)! :-)

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.