PPI for Mojolicious

In the past week or so, there has been a lot of discussion about improving the Perl tutorials. I think this is a great idea, and I even think I have something to contribute. Much of my work has been to allow for more scientific computation with Perl, including using PDL.

In order to start making a “Perl for Science” tutorial site, including some non-science Perl beginning material, I wanted to find a CMS, written in Perl (I can’t have a Perl tutorial site written in PHP!!) and having built-in code syntax highlighting. I couldn’t find it. Then I decided I had wanted a reason to try Mojolicious, so maybe this was it. I could write a template for tutorials and populate then with content using PPI to provide highlighting.

Since Mojolicious::Plugin::PPI didn’t exist yet, I made it up, based in large part on PPI::HTML. It is still rough around the edges, but I thought I would post something here to get some comments. I’m thinking about trying PrePAN too, but I haven’t gotten to it yet.

P.S. The tutorial site isn’t up yet, and may not be for a little bit. Of course I will post here when it is.

4 Comments

It doesn’t call itself a CMS, but ikiwiki comes really damn close to being one. :)

(Also, it already does have code highlighting capabilities.)

looking forward to the tutorial! I would not mind if the site displaying Perl content was written in PHP. :-)

There is a Javascript syntax highlighter that works for Perl: http://alexgorbatchev.com/SyntaxHighlighter/

By the way I use it in https://github.com/zby/Nblog - which is a blog engine I am working on.

Leave a comment

About Joel Berger

user-pic As I delve into the deeper Perl magic I like to share what I can.