Yesterday, (while hacking around some files) I unadvertedly started to do what I haven’t planned to do. Today, the unplanned result was: a new
FreeBSD port.
I wanted to show some of my scripts in a fancy way, something like “syntax highlighted”. In PHP, there are 2 highlight-related built-in functions which get the job done in a matter of seconds. In fact, all I needed to do is to pass my scripts through the highlight_file() function and that was it! But what about my Perl scripts? 
As far as I know, Perl doesn’t provide any highlight-related built-in functions like PHP. But that wouldn’t stop a Perl monger like me to “find a way to do it”… While searching in CPAN and the FreeBSD ports tree, I found that some other people had the same worry before and coded their own solutions.
I hacked around some web-driven applications such as: Apache::Syntax::Highlight::Perl and mod_color; the perl2html command-line tool; PPI::HTML and Syntax::Highlight::Perl modules; and finally I got to Syntax::Highlight::Perl::Improved. This last module was simple and powerful enough to do what I wanted and without the need of setting up a CGI/mod_perl environment! 
It’s only downside was the lack of a FreeBSD port for it, it had to be installed through CPAN.pm. So after using it and being happy with its results, I decided to make a port and send it to the FreeBSD PR database. I know it can take a long time for the port to be committed into the ports tree, but in the meantime you can get a package from my FreeBSD ports page. Enjoy! 